var domain = window.location.hostname;

function Cookie() {
	this.SetCookie = function(sName, sValue, nExpireDays, sDomain, sPath) {
		var sCookie = sName + "=" + escape(sValue) + ";";
		if (nExpireDays) {
			var oDate = new Date();
			oDate.setMilliseconds(oDate.getMilliseconds() + parseInt(nExpireDays) * 24 * 3600 * 1000);
			sCookie += "expires=" + oDate.toUTCString() + ";";
		}
		if (sDomain) {
			sCookie += "domain=" + sDomain + ";";
		}
		if (sPath) {
			sCookie += "path=" + sPath + ";"
		}
		document.cookie = sCookie;
	}
	this.GetCookie = function(sName) {
		var aCookie = document.cookie.split("; ");
		for (var i = 0; i < aCookie.length; i++) {
			var aCrumb = aCookie[i].split("=");
			if (sName == aCrumb[0]) {
				return aCrumb.length >= 2 ? unescape(aCrumb[1]) : "";
			}
		}
		return null;
	}
}
var cookie = new Cookie();

var limit = 20; //每页默认查询20条数据
var limits = [20, 50, 100, 200, 500, 1000, 5000, 10000];
var cellMinWidth = 120, //每个单元格默认宽度
	height_105 = 'full-105', //每个表格默认高度
	height_115 = 'full-105', //每个表格默认高度
	height_155 = 'full-155'; //每个表格默认高度
var numReg = /^[1-9]\d*$/, //正整数正则表达式
	zorenumReg = /^([1-9]\d*|[0]{1,1})$/, //手机号正则表达式
	telReg = /^1[0-9]{10}$/, //手机号正则表达式
	qqReg = /^[1-9][0-9]{4,14}$/, //qq验证
	xiaoshuReg = /^\d+(\.\d+)?$/,
	priceReg = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
	emailReg = /^(\w)+(\.\w+)*@(\w)+((\.\w{2,3}){1,3})$/, //邮箱验证
	re = /^[\u4e00-\u9fa5]{1}[A-Z]{1}[A-Z_0-9]{5}$/,
	regCard = /^(\d{16}|\d{19})$/,
	idCard = /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/,
	hideTel = /^(\d{3})\d{4}(\d{4})$/,
	urlreg = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;


const host = 'https://api.aideapi.com/api/router/';
const host_com = 'https://api.aideapi.com/';
//const shopid = '&shopid='+localStorage.getItem('pxy_shopid') +'&shopname='+localStorage.getItem('pxy_shopname')
const shopid = '&shopid=' + localStorage.getItem('pxy_shopid');
const parent_shopid = '&shopid=' + localStorage.getItem('pxy_parent_shopid');



//C
const VUE_SHOP_BASE_URL = "http://localhost:5173/#"
var host_configure =
	'?app_id=SHOP_Sys&secret_id=shopsysiWSPobnqU5997O4IPyRhBKOODjiHDcGTCS&secret_key=ce219e29ce9c4cf4b623fa063688246shopsys';
var host_configure_wx =
	'?app_id=SHOP_WeiXin&secret_id=shopweixinWSPobnqU5iCzO89IPyRhBKOODjiHDcGTCS&secret_key=BdpA9EW5ftxRZ8rtaRjQONNF1pXCITXe';

var uid_token = '&uid=' + cookie.GetCookie('shop_uid') + '&token=' + cookie.GetCookie('shop_token') + shopid
var uid_token_parent = '&uid=' + cookie.GetCookie('shop_uid') + '&token=' + cookie.GetCookie('shop_token') + parent_shopid
var uid_token_nos = '&uid=' + cookie.GetCookie('shop_uid') + '&token=' + cookie.GetCookie('shop_token')

function getAuthVueRequestUrl(url, params) {
	params = params || ''
	return VUE_SHOP_BASE_URL + url + '?parent_shopid=' + localStorage.getItem('pxy_parent_shopid') + uid_token + params
}

// 监听vue项目关闭弹窗消息

function addVueShopEventListener(afterFun) {
	window.addEventListener('message', e => {
	
		console.log(`e:`,e);
		var vueOrigin = VUE_SHOP_BASE_URL.substring(0, VUE_SHOP_BASE_URL.lastIndexOf('/'))
		console.log(vueOrigin);
		if(e.origin === vueOrigin && e.data.fn === 'closeLayerDialog'){
			layer.closeAll()
			afterFun()
		}
	
	})
}

var server = {
	// 核销信息
	checkoffinformation: host + "sys.shop.order_used.record" + host_configure + uid_token,
	//左边菜单查询
	queryleftmenulist: host + "sys.module.menulist" + host_configure + uid_token + '&client=1',
	//应用模块
	querymodulelist: host + "sys.module.list" + host_configure,
	addsubmodule: host + "sys.module.add" + host_configure,
	editsubmodule: host + "sys.module.edit" + host_configure,
	deletesubmodule: host + "sys.module.delete" + host_configure + uid_token,
	detailsubmodule: host + "sys.module.detail" + host_configure + uid_token,

	//APP功能模块
	queryshopmodulelist: host + "sys.shopmodule.list" + host_configure + uid_token,
	addsubshopmodule: host + "sys.shopmodule.add" + host_configure + uid_token,
	editsubshopmodule: host + "sys.shopmodule.edit" + host_configure + uid_token,
	deletesubshopmodule: host + "sys.shopmodule.delete" + host_configure + uid_token,
	detailsubshopmodule: host + "sys.shopmodule.detail" + host_configure + uid_token,



	//APP轮播图
	shop_banner_query: host + "shop.banner.query" + host_configure + uid_token,
	shop_banner_save: host + "shop.banner.save" + host_configure + uid_token,
	shop_banner_del: host + "shop.banner.del" + host_configure + uid_token,


	addmember_role: host + "sys.member_role.add" + host_configure + uid_token,
	deletemember_role: host + "sys.member_role.delete" + host_configure + uid_token,
	/* 权限管理 */
	querymoduletree: host + "sys.module.tree" + host_configure + uid_token,
	querycurrent_user: host + "sys.current_user.query" + host_configure + uid_token,
	updatemember_role: host + "sys.member_role.purview" + host_configure + uid_token,
	//登录
	login: host + "password.login" + host_configure + '&client=1',
	login_smscode: host + "op.smscode.login" + host_configure + '&client=1',

	/* 客户微信解绑*/
	//	remove_binding: host + 'op.customer_remove_binding' + host_configure + uid_token,

	queryusersmscode: host + "op.user.smscode" + host_configure,
	forget_updatepassword: host + "op.password.update" + host_configure,
	change_updatepassword: host + "password.update" + host_configure + uid_token,
	/* 上传图片 */
	upimg: host_com + "Uploader/",
	// 营业执照识别
	getbizlicense: host_com + "api/OCR/BizLicense",
	// 身份证识别
	getidcardmsg: host_com + "api/idcard/",
	// 银行卡识别
	getcredential: host_com + "api/OCR/Credential",
	/* 字典 */
	querymap: host + 'dict_libraries.query' + host_configure + uid_token,
	/* 全局配置 */
	queryglobal: host + 'global.query' + host_configure,
	/* 查询地区*/
	queryarea: host + 'op.fc_system_area.query' + host_configure,

	// 快递公司
	querydelivery: host + 'sys.delivery_unit.query' + host_configure + uid_token,
	/* 首页 */
	// queryindex: host + 'op.index.query' + host_configure + uid_token,
	queryindex: host + 'xssd.index.statistics' + host_configure + uid_token,
	queryjylist: host + 'xssd.index.jylist' + host_configure + uid_token,
	/* 平台信息 */
	querysite_config: host + 'op.site_config.query' + host_configure + uid_token,
	querysite_configdetail: host + 'op.site_config.detail' + host_configure + uid_token,
	updatesite_config: host + 'op.site_config.update' + host_configure + uid_token,
	/* 提现设置 */
	querycash_out: host + 'op.cash_out.query' + host_configure + uid_token,
	querycash_outdetail: host + 'op.cash_out.detail' + host_configure + uid_token,
	updatecash_out: host + 'op.cash_out.update' + host_configure + uid_token,
	// 提现申请_审核
	updatepresentation_record: host + 'presentation_record.update' + host_configure + uid_token,
	presentation_audit: host + 'sys.presentation_record.audit' + host_configure + uid_token,
	// 提现申请_拒绝
	updaterefuse: host + 'presentation_record.refuse' + host_configure + uid_token,
	// 提现申请_结算
	settlepresentation_record: host + 'presentation_record.settle' + host_configure + uid_token,

    queryindex_jytotal: host + "xssd.index.jytotal" + host_configure + uid_token,  
	queryindex_hyzltotal: host + "xssd.index.hytotal"+ host_configure + uid_token,   // 会员总量
	queryindex_xfjftotal: host + "xssd.index.xfjftotal"+ host_configure + uid_token,   // 消费积分
	
	queryindex_zyetotal: host + "xssd.index.yetotal"+ host_configure + uid_token,   // 总余额

	/* 查询用户信息 */
	queryuser: host + 'user.query' + host_configure + uid_token,

	querymember_role: host + 'sys.member_role.list' + host_configure + uid_token,
	member_role_query: host + 'sys.member_role.query' + host_configure + uid_token,
	member_role_detail: host + 'sys.member_role.detail' + host_configure + uid_token,
	member_role_edit: host + 'sys.member_role.edit' + host_configure + uid_token,
	/* 全部代理商 */
	queryallagents: host + 'op.customer.query' + host_configure + uid_token,
	queryallagentsdetail: host + 'op.customer.detail' + host_configure + uid_token,
	addallagents: host + 'op.customer.insert' + host_configure + uid_token,
	updateallagents: host + 'op.customer.update' + host_configure + uid_token,
	updatecustomer_union: host + 'op.customer_union.update' + host_configure + uid_token,
	agent_transfer: host + 'op.agent.transfer' + host_configure + uid_token,

	/* 直属代理代理商 */
	querydirectagents: host + 'op.customer_direct.query' + host_configure + uid_token,
	querydirectagentsdetail: host + 'op.customer.detail' + host_configure + uid_token,
	adddirectagents: host + 'op.customer.insert' + host_configure + uid_token,
	updatedirectagents: host + 'op.customer.update' + host_configure + uid_token,
	//结算制度
	settlement_insert: host + 'sys.settlement.insert ' + host_configure + uid_token,
	settlement_detail: host + 'sys.settlement.detail ' + host_configure + uid_token,
	settlement_edit: host + 'sys.settlement.edit' + host_configure + uid_token,
	settlement_query: host + 'sys.settlement.query' + host_configure + uid_token,
	settlement_delete: host + 'sys.settlement.delete' + host_configure + uid_token,
	settlement_switch: host + 'sys.settlement.switch' + host_configure + uid_token,
	/* 产品管理 */
	queryproduct: host + 'op.product.query' + host_configure + uid_token,
	queryproduct_radio: host + 'op.product.radio' + host_configure + uid_token,
	product_tree: host + 'op.product.tree' + host_configure + uid_token,
	query_product_pos: host + 'op.product_pos.query' + host_configure + uid_token,
	deleteproduct: host + 'op.product.delete' + host_configure + uid_token,

	/* 全部商户 */
	queryls_merchant: host + 'op.ls_merchant.query' + host_configure + uid_token,
	queryls_merchantdetail: host + 'op.ls_merchant.detail' + host_configure + uid_token,
	updatels_merchant: host + 'op.ls_merchant.update' + host_configure + uid_token,

	/* 直营商户 */
	querymerchant_direct: host + 'op.merchant_direct.query' + host_configure + uid_token,

	/* 交易记录查询 */
	queryls_trans: host + 'op.ls_trans.query' + host_configure + uid_token,
	queryagentsdetail: host + 'op.customer.detail' + host_configure + uid_token,
	addagents: host + 'op.customer.insert' + host_configure + uid_token,
	updateagents: host + 'op.customer.update' + host_configure + uid_token,
	querymember_trans_month: host + 'op.member_trans_month.query' + host_configure + uid_token,

	/* 交易记录查询 */
	queryallls_pos: host + 'op.ls_pos.query' + host_configure + uid_token,
	/* 分润明细 */
	queryprofit_month: host + 'op.profit_month.list' + host_configure + uid_token,
	queryprofit_member: host + 'op.profit_member.list' + host_configure + uid_token,

	/* 划拨管理 */
	queryallpos_his: host + 'op.pos_his.query' + host_configure + uid_token,

	/* 划拨记录 */
	selectallpos_his: host + 'op.pos_his.select' + host_configure + uid_token,
	updatemerchant_agent: host + 'op.merchant_agent.update' + host_configure + uid_token,
	/* 机具回拨 */
	querypos_undo: host + 'op.pos_undo.query' + host_configure + uid_token,
	addpos_undo: host + 'op.pos_undo.insert' + host_configure + uid_token,

	/* 机具库存 */
	querypos_stock: host + 'op.pos_stock.query' + host_configure + uid_token,
	querypos_out: host + 'op.pos_out.insert' + host_configure + uid_token,
	pos_out: host + 'op.pos_out' + host_configure + uid_token,
	querypos_in: host + 'op.pos_in.insert' + host_configure + uid_token,
	updatepos: host + 'op.pos.update' + host_configure + uid_token,
	detailpos: host + 'op.pos.detail' + host_configure + uid_token,


	/* 伙伴等级 */
	querysite_union: host + 'op.site_union.query' + host_configure + uid_token,
	updatesite_union: host + 'op.site_union.update' + host_configure + uid_token,

	/* banner管理 */
	querybanner: host + 'op.banner.query' + host_configure + uid_token,
	querybannerdetail: host + 'op.banner.detail' + host_configure + uid_token,
	addbanner: host + 'op.banner.insert' + host_configure + uid_token,
	updatebanner: host + 'op.banner.update' + host_configure + uid_token,
	site_icon_query: host + 'op.banner_type.query' + host_configure + uid_token,
	site_icon_insert: host + 'op.site_icon.insert' + host_configure + uid_token,
	site_icon_update: host + 'op.site_icon.update' + host_configure + uid_token,
	site_icon_delete: host + 'op.site_icon.delete' + host_configure + uid_token,

	/* 伙伴讲堂 */
	querynews_cat: host + 'op.news_cat.query' + host_configure + uid_token,
	querynewslist: host + 'op.news.query' + host_configure + uid_token,
	querynewsdetail: host + 'op.news.detail' + host_configure + uid_token,
	updatenews: host + 'op.news.update' + host_configure + uid_token,
	addnews: host + 'op.news.insert' + host_configure + uid_token,
	delnews: host + 'op.news.delete' + host_configure + uid_token,

	/* 结算卡管理 */
	querybank_card: host + 'bank_card.query' + host_configure + uid_token,
	querybank_carddetail: host + 'bank_card.detail' + host_configure + uid_token,
	updatebank_card: host + 'bank_card.update' + host_configure + uid_token,

	/* 提现管理 */
	querypresentation_record: host + 'presentation_record.query' + host_configure + uid_token,
	querypresentation_record1: host + 'presentation_record1.query' + host_configure + uid_token,
	querypresentation_recorddetail: host + 'presentation_record.detail' + host_configure + uid_token,
	updatepresentation_record: host + 'presentation_record.update' + host_configure + uid_token,

	/* 分润管理 */
	querypresentation_recordmy: host + 'op.presentation_record.query' + host_configure + uid_token,
	querypresentation_recorddetailmy: host + 'op.presentation_record.detail' + host_configure + uid_token,
// 释放记录
    queryindex_sfzetotal: host + "xssd.index.sftotal" + host_configure + uid_token,   // 释放总额
    queryindex_actotal: host + "xssd.index.actotal" + host_configure + uid_token,   // A仓金额
    queryindex_bctotal: host + "xssd.index.bctotal" + host_configure + uid_token,   // B仓金额
    queryindex_cctotal: host + "xssd.index.cctotal" + host_configure + uid_token,   // C仓金额
	queryindex_zyetotal: host + "xssd.index.yetotal" + host_configure + uid_token,   // 总余额



	/* queryordersdetail: host + 'op.orders_goods.detail' + host_configure + uid_token,
	updateorders_goods: host + 'op.orders_goods.update' + host_configure + uid_token,
	queryorders_sub: host + 'op.orders_sub.query' + host_configure + uid_token, */


	/* 返佣配置 */
	querysite_rebate: host + 'op.site_rebate.query' + host_configure + uid_token,
	querysite_rebatedetail: host + 'op.site_rebate.detail' + host_configure + uid_token,
	updatesite_rebate: host + 'op.site_rebate.update' + host_configure + uid_token,
	addsite_rebate: host + 'op.site_rebate.insert' + host_configure + uid_token,


	/* 全部消息 */
	querymessages: host + 'op.messages.query' + host_configure + uid_token,
	querymessagesdetail: host + 'op.messages.detail' + host_configure + uid_token,
	addmessages: host + 'op.messages.add' + host_configure + uid_token,
	editmessages: host + 'op.messages.edit' + host_configure + uid_token,
	delmessages: host + 'op.messages.delete' + host_configure + uid_token,


	/* 优惠商品 */
	coupon_goods_query: host + 'op.coupon_goods.query' + host_configure + uid_token,
	coupon_goods_detail: host + 'op.coupon_goods.detail' + host_configure + uid_token,
	coupon_goods_insert: host + 'op.coupon_goods.insert' + host_configure + uid_token,
	coupon_goods_edit: host + 'op.coupon_goods.edit' + host_configure + uid_token,
	coupon_goods_delete: host + 'op.coupon_goods.delete' + host_configure + uid_token,

	/* 会员优惠券 */
	member_coupon_query: host + 'op.member_coupon.query' + host_configure + uid_token,
	member_coupon_detail: host + 'op.member_coupon.detail' + host_configure + uid_token,
	member_coupon_insert: host + 'op.member_coupon.insert' + host_configure + uid_token,
	member_coupon_edit: host + 'op.member_coupon.edit' + host_configure + uid_token,
	member_coupon_delete: host + 'op.member_coupon.delete' + host_configure + uid_token,
	/* 账户余额 */
	op_queryaccountlist: host + 'op.member_account.query' + host_configure + uid_token,
	/* 账单明细 */
	op_querybillslist: host + 'hssd.bills.query' + host_configure + uid_token_parent,
	op_querybillslist1: host + 'op.bills1.query' + host_configure + uid_token,
	
	// 交易总额明细
	op_bills11: host + 'op.bills1.query' + host_configure + uid_token,

	/* 提现管理 */
	service_amount_query: host + 'op.service_amount.query' + host_configure + uid_token,
	service_amount_myself: host + 'op.service_amount.myself' + host_configure + uid_token,
	service_amount_update: host + 'op.service_amount.update' + host_configure + uid_token,
	service_amount_refuse: host + 'op.service_amount.refuse' + host_configure + uid_token,
	/* 转账管理 */
	transfer_record_query: host + 'op.transfer_record.query' + host_configure + uid_token,
	transfer_shop_transfer: host + 'sys.shop_transfer.query' + host_configure + uid_token,
	/* 月激活数 */
	pos_month_query: host + 'op.pos_month.query' + host_configure + uid_token,


	/* 增值服务 */
	increase_service_query: host + 'op.increase_service.query' + host_configure + uid_token,
	increase_service_detail: host + 'op.increase_service.detail' + host_configure + uid_token,
	increase_service_insert: host + 'op.increase_service.insert' + host_configure + uid_token,
	increase_service_edit: host + 'op.increase_service.edit' + host_configure + uid_token,
	increase_service_onoff: host + 'op.increase_service.onoff' + host_configure + uid_token,
	increase_service_delete: host + 'op.increase_service.delete' + host_configure + uid_token,

	/* 增值服务分类 */
	increase_service_tree: host + 'op.increase_service_tree.query' + host_configure + uid_token,
	increase_service_cat_query: host + 'op.increase_service_category.query' + host_configure + uid_token,
	increase_service_cat_insert: host + 'op.increase_service_category.insert' + host_configure + uid_token,
	increase_service_cat_edit: host + 'op.increase_service_category.edit' + host_configure + uid_token,
	increase_service_cat_delete: host + 'op.increase_service_category.delete' + host_configure + uid_token,


	/* 信用卡 */
	card_query: host + 'op.card.query' + host_configure + uid_token,
	card_detail: host + 'op.card.detail' + host_configure + uid_token,
	card_delete: host + 'op.card.delete' + host_configure + uid_token,
	card_edit: host + 'op.card.edit' + host_configure + uid_token,
	card_insert: host + 'op.card.insert' + host_configure + uid_token,
	card_onoff: host + 'op.card.onoff' + host_configure + uid_token,

	/* 申请信用卡 */
	credit_card_query: host + 'op.credit_card.query' + host_configure + uid_token,
	credit_card_delete: host + 'op.credit_card.delete' + host_configure + uid_token,
	credit_card_audit: host + 'op.credit_card.audit' + host_configure + uid_token,




	/* 对账明细*/
	sys_activation_query: host + 'sys.activation.query' + host_configure + uid_token,
	sys_team_profit_query: host + 'sys.team_profit.query' + host_configure + uid_token,
	sys_member_rewards_query: host + 'sys.member_rewards.query' + host_configure + uid_token,
	sys_manage_rewards_query: host + 'sys.manage_rewards.query' + host_configure + uid_token,
	sys_new_rewards_query: host + 'sys.new_rewards.query' + host_configure + uid_token,
	sys_profit_rewards_query: host + 'sys.profit_rewards.query' + host_configure + uid_token,


	/*活动管理*/
	welfare_activities_query: host + 'op.welfare_activities.query' + host_configure + uid_token,
	welfare_activities_tree: host + 'op.welfare_activities.tree' + host_configure + uid_token,
	welfare_activities_delete: host + 'op.welfare_activities.delete' + host_configure + uid_token,
	welfare_activities_insert: host + 'op.welfare_activities.insert' + host_configure + uid_token,
	welfare_activities_edit: host + 'op.welfare_activities.edit' + host_configure + uid_token,
	welfare_activities_onoff: host + 'op.welfare_activities.onoff' + host_configure + uid_token,
	welfare_activities_detail: host + 'op.welfare_activities.detail' + host_configure + uid_token,
	welfare_activities_orders_query: host + 'op.welfare_activities_orders.query' + host_configure + uid_token,

	//---------------------------------------------------------------//
	//用户管理
	sys_user_query: host + 'sys.user.query' + host_configure + uid_token,
	sys_user_detail: host + 'sys.user.detail' + host_configure + uid_token,
	sys_user_edit: host + 'sys.user.edit' + host_configure + uid_token,
	remove_binding: host + 'sys.user_oauth.delete' + host_configure + uid_token,

	shop_member_edit: host + 'sys.shop_member.edit' + host_configure + uid_token,
	shop_member_detail: host + 'sys.shop_member.detail' + host_configure + uid_token,

	agent_member_shop_query: host + 'agent_member_shop.query' + host_configure + uid_token,
	agent_member_shop_detail: host + 'agent_member_shop.detail' + host_configure + uid_token,
	agent_member_shop_edit: host + 'agent_member_shop.edit' + host_configure + uid_token,
	agent_member_shop_insert: host + 'agent_member_shop.insert' + host_configure + uid_token,
	agent_member_shop_delete: host + 'agent_member_shop.delete' + host_configure + uid_token,

	//会员管理
	sys_member_query: host + 'sys.member.query' + host_configure + uid_token,
	sys_member_edit: host + 'sys.member.edit' + host_configure + uid_token,
	sys_member_detail: host + 'sys.member.detail' + host_configure + uid_token,
	sys_member_query1: host + 'sys.member1.query' + host_configure + uid_token,
	sys_siteunion_query: host + 'sys.site_union.query' + host_configure + uid_token,
	sys_member_change_identity: host + 'sys.member.change_identity' + host_configure + uid_token,

	sys_qrcode_onoff: host + 'sys.qrcode.onoff' + host_configure + uid_token,

	member_query: host + 'sys.member.query' + host_configure + uid_token_nos,
	all_member_query: host + 'sys.all_member.query' + host_configure + uid_token_nos,

	//机具绑定 
	sys_member_pos_query: host + 'member_pos.query' + host_configure + uid_token,

	/*//认证管理 */
	querytrulylist: host + 'op.truly.query' + host_configure + uid_token,
	querymemberlist: host + 'op.truly_member.query' + host_configure + uid_token,
	querymemberdetail: host + 'op.truly_member.detail' + host_configure + uid_token,
	querytrulyaudit: host + 'op.truly_member.audit' + host_configure + uid_token,

	/* 产品管理 */
	queryproductlist: host + 'op.product.query' + host_configure + uid_token,
	queryproduct_tree: host + 'op.product_tree.query' + host_configure + uid_token,
	op_queryproductdetail: host + 'op.product.detail' + host_configure + uid_token,
	op_updateproduct: host + 'op.product.update' + host_configure + uid_token,
	op_addproduct: host + 'op.product.insert' + host_configure + uid_token,
	op_onoffproduct: host + 'op.product.onoff' + host_configure + uid_token,


	/* 产品分类 */
	product_category_edit: host + 'op.product_category.edit' + host_configure + uid_token,
	product_category_query: host + 'op.product_category.query' + host_configure + uid_token,
	product_category_detail: host + 'op.product_category.detail' + host_configure + uid_token,
	product_category_add: host + 'op.product_category.insert' + host_configure + uid_token,
	product_category_delete: host + 'op.product_category.delete' + host_configure + uid_token,
	product_category_onoff: host + 'op.product_category.onoff' + host_configure + uid_token,


	// 商品管理  
	querygoods: host + 'op.goods.query' + host_configure + uid_token,
	querygoodsdetail: host + 'op.goods.detail' + host_configure + uid_token,
	updategoods: host + 'op.goods.update' + host_configure + uid_token,
	addgoods: host + 'op.goods.insert' + host_configure + uid_token,
	deletegoods: host + 'op.goods.delete' + host_configure + uid_token,
	onoffgoods: host + 'op.goods.onoff' + host_configure + uid_token,
	copygoods: host + 'sys.goods.copy' + host_configure + uid_token,

	brand_delete: host + 'sys.brand.delete' + host_configure + uid_token,
	brand_detail: host + 'sys.brand.datail' + host_configure + uid_token,
	brand_insert: host + 'sys.brand.insert' + host_configure + uid_token,
	brand_query: host + 'sys.brand.query' + host_configure + uid_token,
	brand_edit: host + 'sys.brand.edit' + host_configure + uid_token,

	// 优惠券 */
	coupon_query: host + 'op.coupon.query' + host_configure + uid_token,
	coupon_detail: host + 'op.coupon.detail' + host_configure + uid_token,
	coupon_insert: host + 'op.coupon.insert' + host_configure + uid_token,
	coupon_edit: host + 'op.coupon.edit' + host_configure + uid_token,
	coupon_delete: host + 'op.coupon.delete' + host_configure + uid_token,
	coupon_onoff: host + 'op.coupon.onoff' + host_configure + uid_token,
	coupon_select: host + 'op.coupon.select' + host_configure + uid_token,
	goods_select: host + 'op.goods.select' + host_configure + uid_token,

	//营销管理 
	market_query: host + 'sys.market.query' + host_configure + uid_token,
	market_insert: host + 'sys.market.insert' + host_configure + uid_token,
	market_delete: host + 'sys.market.delete' + host_configure + uid_token,
	market_detail: host + 'sys.market.detail' + host_configure + uid_token,
	market_edit: host + 'sys.market.edit' + host_configure + uid_token,
	market_onoff: host + 'sys.market.onoff' + host_configure + uid_token,


	//营销商品管理 
	market_goods_query: host + 'sys.market_goods.query' + host_configure + uid_token,
	market_goods_delete: host + 'sys.market_goods.delete' + host_configure + uid_token,
	market_goods_detail: host + 'sys.market_goods.detail' + host_configure + uid_token,
	market_goods_edit: host + 'sys.market_goods.edit' + host_configure + uid_token,
	market_goods_add: host + 'sys.market_goods.add' + host_configure + uid_token,

	/*//整点秒杀*/
	seckill_delete: host + 'sys.seckill.delete' + host_configure + uid_token,
	seckill_edit: host + 'sys.seckill.edit' + host_configure + uid_token,
	seckill_detail: host + 'sys.seckill.detail' + host_configure + uid_token,
	seckill_insert: host + 'sys.seckill.insert' + host_configure + uid_token,
	seckill_query: host + 'sys.seckill.query' + host_configure + uid_token,
	seckill_onoff: host + 'sys.seckill.onoff' + host_configure + uid_token,

	/*//整点秒杀--商品*/
	seckill_goods_add: host + 'sys.seckill_goods.add' + host_configure + uid_token,
	seckill_goods_edit: host + 'sys.seckill_goods.edit' + host_configure + uid_token,
	seckill_goods_detail: host + 'sys.seckill_goods.detail' + host_configure + uid_token,
	seckill_goods_delete: host + 'sys.seckill_goods.delete' + host_configure + uid_token,
	seckill_goods_query: host + 'sys.seckill_goods.query' + host_configure + uid_token,

	/* 付费活动 */
	paid_activities_signUp_query: host + 'sys.paid_activities_signUp.query' + host_configure + uid_token,
	paid_activities_insert: host + 'sys.paid_activities.insert' + host_configure + uid_token,
	paid_activities_edit: host + 'sys.paid_activities.edit' + host_configure + uid_token,
	paid_activities_detail: host + 'sys.paid_activities.detail' + host_configure + uid_token,
	paid_activities_delete: host + 'sys.paid_activities.delete' + host_configure + uid_token,
	paid_activities_query: host + 'sys.paid_activities.query' + host_configure + uid_token,

	/*// 订单管理 */
	queryorders_goods: host + 'op.orders_goods.query' + host_configure + uid_token,
	// 取消订单-原路退
	queryorders_refund: host + 'pay/refund' + host_configure + uid_token,
	// 多多客订单管理
	queryorders_pddgoods: host + 'sys.pdd_order.query' + host_configure + uid_token,
	queryordersdetail: host + 'op.orders_goods.detail' + host_configure + uid_token,
	updateorders_goods: host + 'op.orders_goods.update' + host_configure + uid_token,
	updateorders_delivery: host + 'op.orders_delivery.update' + host_configure + uid_token,
	updateorders_delivery1: host + 'op.orders_delivery.update1' + host_configure + uid_token,
	queryorders_sub: host + 'op.orders_sub.query' + host_configure + uid_token,
	orders_delete: host + 'op.orders_goods.delete' + host_configure + uid_token,
	order_log: host + 'sys.order_log.query' + host_configure + uid_token,
	server_order_edit: host + 'sys.server_order.edit' + host_configure + uid_token,
	sys_order_cancel: host + 'sys.orders.cancel' + host_configure + uid_token,
	sys_order_discount: host + 'sys.orders_discount.edit' + host_configure + uid_token,
	materiel_orders_query: host + 'op.materiel_orders.query' + host_configure + uid_token,
	materiel_orders_query1: host + 'op.materiel_orders1.query' + host_configure + uid_token,
	queryordersreturndetail: host + 'sys.orders_return.query' + host_configure + uid_token,
	updateordersreturn: host + 'sys.orders_return.update' + host_configure + uid_token,
	updateordersreturn_sub: host + 'sys.orders_return.update_order_sub' + host_configure + uid_token,

	/*// 店铺订单管理 */
	shop_orders_delivery: host + 'shop.orders.delivery' + host_configure + uid_token,
	shop_station_orders_delivery: host + 'shop.station.orders.delivery' + host_configure + uid_token +
		'&version_code=100',

	/*订单评论*/
	orders_evaluate_delete: host + 'sys.orders_evaluate.delete' + host_configure + uid_token,
	orders_evaluate_query: host + 'sys.orders_evaluate.query' + host_configure + uid_token,

	/*订单佣金*/
	orders_fee_query: host + 'sys.orders_fee.query' + host_configure + uid_token,
	orders_fee_delete: host + 'sys.orders_fee.delete' + host_configure + uid_token,


	/*订单售后*/
	orders_service_query: host + 'sys.orders_service.query' + host_configure + uid_token,
	orders_service_audit: host + 'sys.orders_service.audit' + host_configure + uid_token,
	orders_service_delete: host + 'sys.orders_service.delete' + host_configure + uid_token,

	/*反馈*/
	site_feedback_query: host + 'sys.site_feedback.query' + host_configure + uid_token,
	site_feedback_delete: host + 'sys.site_feedback.delete' + host_configure + uid_token,
	site_feedback_detail: host + 'sys.site_feedback.detail' + host_configure + uid_token,
	site_feedback_edit: host + 'sys.site_feedback.edit' + host_configure + uid_token,

	/* 帮助中心 */
	listsite_help_cat: host + 'op.site_help_cat.list' + host_configure + uid_token,
	querysite_help_cat: host + 'op.site_help_cat.query' + host_configure + uid_token,
	querysite_rebatedetail: host + 'op.site_rebate.detail' + host_configure + uid_token,
	updatesite_rebate: host + 'op.site_rebate.update' + host_configure + uid_token,
	addsite_rebate: host + 'op.site_rebate.insert' + host_configure + uid_token,

	querysite_help: host + 'op.site_help.query' + host_configure + uid_token,
	querysite_helpdetail: host + 'op.site_help.detail' + host_configure + uid_token,
	addsite_help: host + 'op.site_help.insert' + host_configure + uid_token,
	updatesite_help: host + 'op.site_help.update' + host_configure + uid_token,
	deletesite_help: host + 'op.site_help.delete' + host_configure + uid_token,
	//等级详情
	union_detail_query: host + 'sys.union_detail.query' + host_configure + uid_token,
	union_detail_detail: host + 'sys.union_detail.detail' + host_configure + uid_token,
	union_detail_edit: host + 'sys.union_detail.edit' + host_configure + uid_token,
	union_detail_insert: host + 'sys.union_detail.insert' + host_configure + uid_token,
	union_detail_delete: host + 'sys.union_detail.delete' + host_configure + uid_token,

	site_union_query: host + 'sys.site_union.d' + host_configure + uid_token,


	order_vip_query: host + 'sys.order_vip.query' + host_configure + uid_token,
	order_vip_delete: host + 'sys.order_vip.delete' + host_configure + uid_token,
	/*充值记录*/
	recharge_record_query: host + 'sys.recharge_record.query' + host_configure + uid_token,
	recharge_record_insert: host + 'sys.recharge_record.insert' + host_configure + uid_token,
	transfer_record_query: host + 'sys.transfer_record.query' + host_configure + uid_token,
	recharge_record_delete: host + 'sys.recharge_record.delete' + host_configure + uid_token,
	//收款记录	
	collections_record_query: host + 'sys.collections_record.query' + host_configure + uid_token,
	collections_record_query1: host + 'sys.collections_record1.query' + host_configure + uid_token,
	collections_record_delete: host + 'sys.collections_record.delete' + host_configure + uid_token,


	// 红包
	union_packet_query: host + 'sys.union_packet.query' + host_configure + uid_token,
	union_packet_edit: host + 'sys.union_packet.edit' + host_configure + uid_token,
	union_packet_insert: host + 'sys.union_packet.insert' + host_configure + uid_token,
	union_packet_detail: host + 'sys.union_packet.detail' + host_configure + uid_token,
	union_packet_delete: host + 'sys.union_packet.delete' + host_configure + uid_token,
	member_packet_query: host + 'sys.member_packet.query' + host_configure + uid_token,

	//店铺
	shop_query: host + 'sys.shop.query' + host_configure + uid_token_nos,
	shop_insert: host + 'sys.shop.insert' + host_configure + uid_token,
	shop_edit: host + 'sys.shop.edit' + host_configure + uid_token,
	shop_delete: host + 'sys.shop.delete' + host_configure + uid_token,
	shop_detail: host + 'sys.shop.detail' + host_configure + uid_token,

	//分组
	site_group_select: host + 'sys.site_group.select' + host_configure + uid_token,
	site_group_edit: host + 'sys.site_group.edit' + host_configure + uid_token,
	site_group_delete: host + 'sys.site_group.delete' + host_configure + uid_token,
	site_group_detail: host + 'sys.site_group.detail' + host_configure + uid_token,
	site_group_insert: host + 'sys.site_group.insert' + host_configure + uid_token,
	site_group_query: host + 'sys.site_group.query' + host_configure + uid_token,
	// 服务费
	site_cash_out_insert: host + 'sys.site_cash_out.insert ' + host_configure + uid_token,
	site_cash_out_detail: host + 'sys.site_cash_out.detail ' + host_configure + uid_token,
	site_cash_out_edit: host + 'sys.site_cash_out.edit' + host_configure + uid_token,
	site_cash_out_query: host + 'sys.site_cash_out.query' + host_configure + uid_token,
	site_cash_out_delete: host + 'sys.site_cash_out.delete' + host_configure + uid_token,

	// 等级
	site_union_query: host + 'sys.site_union.query' + host_configure + uid_token,
	site_union_insert: host + 'sys.site_union.insert' + host_configure + uid_token,
	site_union_detail: host + 'sys.site_union.detail' + host_configure + uid_token,
	site_union_edit: host + 'sys.site_union.edit' + host_configure + uid_token,
	site_union_delete: host + 'sys.site_union.delete' + host_configure + uid_token,

	site_plus_query: host + 'sys.site_plus.query' + host_configure + uid_token,
	site_plus_insert: host + 'sys.site_plus.insert' + host_configure + uid_token,
	site_plus_detail: host + 'sys.site_plus.detail' + host_configure + uid_token,
	site_plus_edit: host + 'sys.site_plus.edit' + host_configure + uid_token,
	site_plus_delete: host + 'sys.site_plus.delete' + host_configure + uid_token,
	// 账户查询 
	sys_account_account: host + 'sys.account.query' + host_configure + uid_token,
	account_switch: host + 'sys.account.switch' + host_configure + uid_token,

	// 平台配置
	sys_shop_config_delete: host + 'sys.shop_config.delete' + host_configure + uid_token,
	sys_shop_config_insert: host + 'sys.shop_config.insert' + host_configure + uid_token,
	sys_shop_config_edit: host + 'sys.shop_config.edit' + host_configure + uid_token,
	sys_shop_config_detail: host + 'sys.shop_config.detail' + host_configure + uid_token,
	sys_shop_config_query: host + 'sys.shop_config.query' + host_configure + uid_token,


	//报销记录
	sys_report_form_query: host + 'sys.report_form.query' + host_configure + uid_token,
	sys_report_form_edit: host + 'sys.report_form.edit' + host_configure + uid_token,
	sys_report_form_detail: host + 'sys.report_form.detail' + host_configure + uid_token,
	sys_report_form_delete: host + 'sys.report_form.delete' + host_configure + uid_token,

	sys_file_upload_delete: host + 'sys.file_upload.delete' + host_configure + uid_token,
	sys_file_upload_edit: host + 'sys.file_upload.edit' + host_configure + uid_token,
	sys_file_upload_detail: host + 'sys.file_upload.detail' + host_configure + uid_token,
	sys_file_upload_query: host + 'sys.file_upload.query' + host_configure + uid_token,

	sys_work_order_delete: host + 'sys.work_order.delete' + host_configure + uid_token,
	sys_work_order_query: host + 'sys.work_order.query' + host_configure + uid_token,
	sys_work_order_detail: host + 'sys.work_order.detail' + host_configure + uid_token,
	sys_work_order_insert: host + 'sys.work_order.insert' + host_configure + uid_token,
	sys_work_order_edit: host + 'sys.work_order.edit' + host_configure + uid_token,


	/*服务订单*/
	server_order_query: host + 'sys.server_order.query' + host_configure + uid_token,
	server_order_delete: host + 'sys.server_order.delete' + host_configure + uid_token,
	server_order_detail: host + 'sys.server_order.detail' + host_configure + uid_token,
	order_log: host + 'sys.order_log.query' + host_configure + uid_token,
	order_fee_query: host + 'sys.order_fee.query' + host_configure + uid_token,
	server_order_edit: host + 'sys.server_order.edit' + host_configure + uid_token,
	server_order_status_edit: host + 'sys.server_order_status.edit' + host_configure + uid_token,
	server_order_pay: host + 'sys.server_order.pay' + host_configure + uid_token,
	server_order_cancel: host + 'sys.server_order.cancel' + host_configure + uid_token,
	server_order_notes_edit: host + 'sys.orders_notes.edit' + host_configure + uid_token,
	order_type_edit: host + 'sys.order_type.edit' + host_configure + uid_token,
	goods_order_send: host + 'sys.server_order.send' + host_configure + uid_token,

	/*申请师傅*/

	master_list: host + 'sys.master.list' + host_configure + uid_token,
	master_audit: host + 'sys.member_master.audit' + host_configure + uid_token,
	master_edit: host + 'sys.member_master.edit' + host_configure + uid_token,
	shop_copartner_insert: host + 'sys.shop_copartner.insert' + host_configure + uid_token,  // 合伙人新增
	shop_copartner_update: host + 'sys.shop_copartner.update' + host_configure + uid_token,  // 合伙人修改
	master_delete: host + 'sys.master.delete' + host_configure + uid_token,
	master_disable: host + 'sys.master.disable' + host_configure + uid_token,

	/*会员师傅*/
	member_master_query: host + 'sys.member_master.query' + host_configure + uid_token,
	member_master_detail: host + 'sys.member_master.detail' + host_configure + uid_token,
	agent_master_detail: host + 'agent.detail' + host_configure + uid_token,
	shop_copartner_detail: host + 'sys.shop_copartner.query' + host_configure + uid_token,  // 合伙人详情
	/*派单*/
	server_order_designate: host + 'sys.server_order.designate' + host_configure + uid_token,
	/*更换师傅*/
	server_order_forward: host + 'sys.server_order.forward' + host_configure + uid_token,

	/*师傅订单统计*/
	master_orders_query: host + 'sys.master_orders.query' + host_configure + uid_token,
	master_orders_by_day_query: host + 'sys.master_orders_by_day.query' + host_configure + uid_token,
	/*师傅凭证*/
	orders_image_query: host + 'sys.orders_image.query' + host_configure + uid_token,

	member_type_delete: host + 'sys.member_type.delete' + host_configure + uid_token,
	member_type_insert: host + 'sys.member_type.insert' + host_configure + uid_token,
	member_type_edit: host + 'sys.member_type.edit' + host_configure + uid_token,
	member_type_detail: host + 'sys.member_type.detail' + host_configure + uid_token,
	member_type_query: host + 'sys.member_type.query' + host_configure + uid_token,


	goods_requirement_query: host + 'goods_requirement.query' + host_configure + uid_token,
	goods_requirement_edit: host + 'goods_requirement.edit' + host_configure + uid_token,
	goods_requirement_delete: host + 'goods_requirement.delete' + host_configure + uid_token,
	goods_requirement_insert: host + 'goods_requirement.insert' + host_configure + uid_token,
	goods_requirement_detail: host + 'goods_requirement.detail' + host_configure + uid_token,

	site_recharge_query: host + 'site_recharge.query' + host_configure + uid_token,
	site_recharge_edit: host + 'site_recharge.edit' + host_configure + uid_token,
	site_recharge_delete: host + 'site_recharge.delete' + host_configure + uid_token,
	site_recharge_detail: host + 'site_recharge.detail' + host_configure + uid_token,
	site_recharge_insert: host + 'site_recharge.insert' + host_configure + uid_token,

	agent_query: host + 'agent.query' + host_configure + uid_token,
	agent_edit: host + 'agent.edit' + host_configure + uid_token,
	agent_insert: host + 'agent.insert' + host_configure + uid_token,
	agent_detail: host + 'agent.detail' + host_configure + uid_token,

	sys_news_query: host + 'sys.news.query' + host_configure + uid_token,
	sys_news_edit: host + 'sys.news.edit' + host_configure + uid_token,
	sys_news_onoff: host + 'sys.news.onoff' + host_configure + uid_token,
	sys_news_delete: host + 'sys.news.delete' + host_configure + uid_token,
	sys_news_insert: host + 'sys.news.insert' + host_configure + uid_token,
	sys_news_detail: host + 'sys.news.detail' + host_configure + uid_token,
	news_cat_select: host + 'sys.news_cat.select' + host_configure + uid_token,
	sys_news_cat_query: host + 'sys.news_cat.query' + host_configure + uid_token,
	sys_news_cat_tree_query: host + 'sys.news_cat_tree.query' + host_configure + uid_token,
	sys_news_cat_edit: host + 'sys.news_cat.edit' + host_configure + uid_token,
	sys_news_cat_insert: host + 'sys.news_cat.insert' + host_configure + uid_token,
	sys_news_cat_detail: host + 'sys.news_cat.detail' + host_configure + uid_token,

	sys_collection_statistics_by_month_query: host + 'sys.collection_statistics_by_month.query' + host_configure +
		uid_token,
	sys_collection_statistics_by_day_query: host + 'sys.collection_statistics_by_day.query' + host_configure +
		uid_token,

	//底部菜单
	bottom_menu_query: host + 'sys.bottom_menu.query' + host_configure + uid_token,
	bottom_menu_edit: host + 'sys.bottom_menu.edit' + host_configure + uid_token,
	bottom_menu_delete: host + 'sys.bottom_menu.delete' + host_configure + uid_token,
	bottom_menu_detail: host + 'sys.bottom_menu.detail' + host_configure + uid_token,
	bottom_menu_insert: host + 'sys.bottom_menu.insert' + host_configure + uid_token,

	//课程分类
	class_cats_delete: host + 'sys.class_cats.delete' + host_configure + uid_token,
	class_cats_edit: host + 'sys.class_cats.edit' + host_configure + uid_token,
	class_cats_detail: host + 'sys.class_cats.detail' + host_configure + uid_token,
	class_cats_insert: host + 'sys.class_cats.insert' + host_configure + uid_token,
	class_cats_query: host + 'sys.class_cats.query' + host_configure + uid_token,
	class_cats_tree: host + 'sys.class_cats.tree' + host_configure + uid_token,

	//课程管理
	class_delete: host + 'sys.class.delete' + host_configure + uid_token,
	class_edit: host + 'sys.class.edit' + host_configure + uid_token,
	class_detail: host + 'sys.class.detail' + host_configure + uid_token,
	class_insert: host + 'sys.class.insert' + host_configure + uid_token,
	class_query: host + 'sys.class.query' + host_configure + uid_token,

	//机具管理
	pos_query: host + 'sys.pos.query' + host_configure + uid_token,
	pos_bind_query: host + 'pos_bind.query' + host_configure + uid_token,
	pos_bind_delete: host + 'pos_bind.delete' + host_configure + uid_token,
	pos_bind_edit: host + 'pos_bind.edit' + host_configure + uid_token,
	pos_edit: host + 'sys.pos.edit' + host_configure + uid_token,
	pos_delete: host + 'sys.pos.delete' + host_configure + uid_token,
	pos_query1: host + 'sys.pos1.query' + host_configure + uid_token,
	pos_insert: host + 'sys.pos.insert' + host_configure + uid_token,
	pos_detail: host + 'sys.pos.detail' + host_configure + uid_token,
	pos_trade_query: host + 'sys.pos_trade.query' + host_configure + uid_token,
	pos_trade_query1: host + 'sys.pos_trade1.query' + host_configure + uid_token,

	// 供应商管理
	supplier_list_query: host + 'supplier.list' + host_configure + uid_token,
	// 供应商列表
	material_supplier_list: host + 'sys.material.supplier_list' + host_configure + uid_token,
	shop_agent_detail: host + 'sys.shop_agent.detail' + host_configure + uid_token,
	// 收益列表
	shop_bills_list: host + 'sys.shop_agent_bills_list' + host_configure + uid_token,
	sys_shop_agent_mch_bills: host + 'sys.shop_agent.mch_bills' + host_configure + uid_token,
	
	// 交易统计
	trans_total_list_query: host + 'sys.trans_total.list' + host_configure + uid_token,
	sys_member_off_recommend: host + 'sys.member.off_recommend' + host_configure + uid_token,
	sys_member_account_total_info: host + 'sys.member_account.total_info' + host_configure + uid_token,
	
	

	// 套餐管理
	shop_package_list_query: host + 'sys.shop_package.list' + host_configure + uid_token,
	shop_package_insert: host + 'sys.shop_package.insert' + host_configure + uid_token,
	shop_package_edit: host + 'sys.shop_package.edit' + host_configure + uid_token,
	// 套餐商品
	shop_package_goods_query: host + 'sys.shop_package_goods.list' + host_configure + uid_token,
	shop_package_goods_insert: host + 'sys.shop_package_goods.insert' + host_configure + uid_token,
	shop_package_goods_update: host + 'sys.shop_package_goods.update' + host_configure + uid_token,
	shop_package_goods_details: host + 'sys.shop_package_goods.detail' + host_configure + uid_token,
	shop_package_goods_delete: host + 'sys.shop_package_goods.delete' + host_configure + uid_token,

	//商户管理
	// 商户进件
	// 查询进件
	query_merchant_in: host + 'merchant.in.query' + host_configure + uid_token,
	//支付宝商户查询
	query_merchant_alipay: host + 'merchant.alipay.query' + host_configure + uid_token,
	//支付宝商户保存
	merchant_alipay_save: host + 'merchant.alipay.save' + host_configure + uid_token,
	merchant_in_save: host + 'sys.merchant_in.save' + host_configure + uid_token,

	sys_user_add: host + 'usser.insert' + host_configure + uid_token,
	sys_product_list: host + 'shop.product_category.list' + host_configure + uid_token,


	// 模板列表
	shop_feetemp_list: host + 'shop.feetemp.list' + host_configure + uid_token,
	// 模板添加,修改
	shop_feetemp_save: host + 'shop.feetemp.save' + host_configure + uid_token,

	// 活动模板_查询
	shop_promotion_temp_query: host + 'shop.promotion.temp.query' + host_configure + uid_token,
	// 活动模板_添加
	shop_promotion_temp_insert: host + 'shop.promotion.temp.insert' + host_configure + uid_token,
	// 活动模板_详情
	shop_promotion_temp_detail: host + 'shop.promotion.temp.detail' + host_configure + uid_token,
	// 活动模板_修改 
	shop_promotion_temp_edit: host + 'shop.promotion.temp.edit' + host_configure + uid_token,
	// 活动模板_删除
	shop_promotion_temp_delete: host + 'shop.promotion.temp.delete' + host_configure + uid_token,
	// 活动模板_onoff
	shop_promotion_temp_onoff: host + 'shop.promotion.temp.onoff' + host_configure + uid_token,

	// 店铺活动添加
	shop_promotion_insert: host + 'shop.promotion.insert' + host_configure + uid_token,
	//单条活动商品添加
	shop_promotion_goods_add: host + 'shop.promotion_goods.add' + host_configure + uid_token,
	// 店铺活动列表
	shop_promotion_query: host + 'shop.promotion.query' + host_configure + uid_token,
	// 店铺活动详情
	shop_promotion_detail: host + 'shop.promotion.detail' + host_configure + uid_token,
	// 店铺活动修改
	shop_promotion_edit: host + 'shop.promotion.edit' + host_configure + uid_token,
	// 店铺活动删除
	shop_promotion_delete: host + 'shop.promotion.delete' + host_configure + uid_token,
	// 店铺活动开关
	shop_promotion_onoff: host + 'shop.promotion.onoff' + host_configure + uid_token,

	// 店铺拼团活动列表
	shop_seckill_issue_query: host + 'shop.seckill_issue.query' + host_configure + uid_token,
	// 店铺拼团活动取消
	shop_seckill_issue_cancel: host + 'shop.seckill_issue.cancel' + host_configure + uid_token,
	// 店铺拼团活动开奖
	shop_seckill_issue_end: host + 'shop.seckill_issue.end' + host_configure + uid_token,

	/*申请团长*/

	//团长_查询
	shop_leader_query: host + 'shop.leader.query' + host_configure_wx + uid_token,
	//团长_申请_修改
	shop_leader_update: host + 'shop.leader.update' + host_configure_wx + uid_token,
	//团长申请信息
	shop_leader_info_detail: host + 'shop.leader_info.detail' + host_configure_wx + uid_token,
	//团长审核_查询
	shop_leader_list: host + 'shop.leader.list' + host_configure_wx + uid_token,
	//团长审核_详情
	shop_leader_detail: host + 'shop.leader.detail' + host_configure_wx + uid_token,
	//团长_审核
	shop_leader_audit: host + 'shop.leader.audit' + host_configure_wx + uid_token,
	//团长_申请
	shop_leader_query: host + 'shop.leader.insert' + host_configure_wx + uid_token,
	//团长_禁用
	sys_shop_leader_disable: host + 'sys.shop_leader.disable' + host_configure + uid_token,

	/*申请配送站*/
	//配送站_查询
	shop_station_query: host + 'shop.station.query' + host_configure_wx + uid_token,
	//配送站_申请_修改
	shop_station_update: host + 'shop.station.update' + host_configure_wx + uid_token,
	//配送站申请信息
	shop_station_info_detail: host + 'shop.station_info.detail' + host_configure_wx + uid_token,
	//配送站审核_查询
	shop_station_list: host + 'shop.station.list' + host_configure_wx + uid_token,
	//配送站审核_详情
	shop_station_detail: host + 'shop.station.detail' + host_configure_wx + uid_token,
	//配送站_审核
	shop_station_audit: host + 'shop.station.audit' + host_configure_wx + uid_token,
	//配送站_申请
	shop_station_insert: host + 'shop.station.insert' + host_configure_wx + uid_token,

	sys_shop_station_detail: host + 'sys.shop_station.detail' + host_configure + uid_token,
	sys_shop_station_update: host + 'sys.shop_station.update' + host_configure + uid_token,
	sys_shop_station_disable: host + 'sys.shop_station.disable' + host_configure + uid_token,


	//商品销售统计
	shop_station_orders_goods_sales_detail: host + 'shop.station.orders_goods.sales_detail' + host_configure +
		uid_token,
	shop_station_orders_goods_sales: host + 'shop.station.orders_goods.sales' + host_configure + uid_token,
	shop_station_orders_goods_sales2: host + 'shop.station.orders_goods.sales2' + host_configure + uid_token,

	/*商户入户*/
	//商户_查询
	shop_sub_query: host + 'shop.sub.query' + host_configure_wx + uid_token,
	//商户_申请_修改
	shop_sub_update: host + 'shop.sub.update' + host_configure_wx + uid_token,
	//商户申请信息
	shop_sub_info_detail: host + 'shop.sub_info.detail' + host_configure_wx + uid_token,
	//商户审核_查询
	shop_sub_list: host + 'sys.shop_sub.list' + host_configure + uid_token,
	//商户审核_详情
	shop_sub_detail: host + 'shop.sub.detail' + host_configure_wx + uid_token,
	//商户_审核
	shop_sub_audit: host + 'shop.sub.audit' + host_configure_wx + uid_token,
	//商户_申请
	shop_sub_insert: host + 'shop.sub.insert' + host_configure_wx + uid_token,
	//商户入驻详情
	sys_shop_sub_detail: host + 'sys.shop_sub.detail' + host_configure + uid_token,
	//修改商户入驻
	sys_shop_sub_update: host + 'sys.shop_sub.update' + host_configure + uid_token,
	//审核商户入驻
	sys_shop_sub_check: host + 'sys.shop_sub.check' + host_configure + uid_token,
	// 洗车店审核
	sys_shop_car_check: host + 'sys.shop_car.check' + host_configure + uid_token,
	
	
	//合伙人申请_查询
	shop_copartner_list: host + 'shop.copartner.list' + host_configure + uid_token,
	copartner_shop_list: host + 'sys.copartner_shop.list' + host_configure + uid_token,
	shop_copartner_transfer: host + 'shop.copartner.transfer' + host_configure + uid_token,
	
	//运营商
	sys_agent_list: host + 'sys.agent.list' + host_configure + uid_token,
	sys_agent_update: host + 'sys.agent.update' + host_configure + uid_token,
	sys_agent_insert: host + 'sys.shop_agent.insert' + host_configure + uid_token,
	sys_agent_detail: host + 'sys.agent.detail' + host_configure + uid_token,
	sys_xssd_agent_shop_query: host + 'sys.xssd.agent_shop.query' + host_configure + uid_token,
	sys_agent_shop_trans_query: host + 'sys.xssd.agent_shop_trans.query' + host_configure + uid_token,
	sys_agent_info_query: host + 'sys.agent_info.query' + host_configure + uid_token,
	
	
	//视频乐园
	sys_shop_video_detail: host + 'sys.shop_video.detail' + host_configure + uid_token,
	sys_shop_video_delete: host + 'sys.shop_video.delete' + host_configure + uid_token,
	sys_shop_video_update: host + 'sys.shop_video.update' + host_configure + uid_token,
	sys_shop_video_list: host + 'sys.shop_video.list' + host_configure + uid_token,
	sys_shop_video_put_in_list: host + 'sys.shop_video.put_in_list' + host_configure + uid_token,
	
	//消商学院
	sys_shop_video_edu_detail: host + 'sys.shop_video_edu.detail' + host_configure + uid_token,
	sys_shop_video_edu_delete: host + 'sys.shop_video_edu.delete' + host_configure + uid_token,
	sys_shop_video_edu_update: host + 'sys.shop_video_edu.update' + host_configure + uid_token,
	sys_shop_video_edu_list: host + 'sys.shop_video_edu.list' + host_configure + uid_token,
	sys_shop_video_edu_insert: host + 'sys.shop_video_edu.insert' + host_configure + uid_token,
	
	//交易记录
	sys_settle_account_query: host + 'sys.settle.account.query' + host_configure + uid_token,
	sys_settle_trans_query: host + 'sys.settle.trans.query' + host_configure + uid_token,
	sys_collections_record_query: host + 'sys.collections.record.query' + host_configure + uid_token,
	sys_collections_record_home_analyze: host + 'sys.collections.record.home_analyze' + host_configure + uid_token,
	sys_collections_record_home_chart: host + 'sys.collections.record.home_chart' + host_configure + uid_token,
	sys_balance_pay_query: host + 'sys.balance.pay.query' + host_configure + uid_token,
	sys_settle_card_query: host + 'sys.settle.card.query' + host_configure + uid_token,

	// 快捷交易
	sys_fastpay_card_payment_query: host + 'sys.fastpay_card_payment.query' + host_configure + uid_token,

	// 通用
	// 地区查询
	sys_area_list: host + 'sys.area.list' + host_configure + uid_token,

	// 释放统计
	sys_account_ledger_query: host + 'sys.account.ledger.query' + host_configure + uid_token,
	sys_account_daily_list: host + 'sys.account.daily.list' + host_configure + uid_token,
	sys_account_record_list: host + 'sys.account.record.list' + host_configure + uid_token,
	
	// 释放比例
	sys_member_release_list: host + 'hssd.member_release.query' + host_configure + uid_token,
	//提现申请
	sys_shop_cash_out_query: host + 'sys.shop.cash_out.query' + host_configure + uid_token,
	sys_shop_cash_outcheckgroup_query: host + 'sys.shop.cash_out.checkgroup' + host_configure + uid_token,
	sys_shop_cash_out_check: host + 'sys.shop.cash_out.check' + host_configure + uid_token,
	sys_shop_cash_out_insert: host + 'sys.shop.cash_out.insert' + host_configure + uid_token,
	sys_shop_cash_out_del: host + 'sys.shop.cash_out.del' + host_configure + uid_token,

	// 数据分析
	// 总数据集合
	hssd_shop_billtotal: host + 'hssd.shop.billtotal' + host_configure_wx + uid_token,
	// 交易额
	hssd_shop_jylist: host + 'hssd.shop.jylist' + host_configure_wx + uid_token,
	hssd_shop_jytotal: host + 'hssd.shop.jytotal' + host_configure_wx + uid_token,
	// 消费积分
	hssd_shop_xfjflist: host + 'hssd.shop.xfjflist' + host_configure_wx + uid_token,
	hssd_shop_xfjftotal: host + 'hssd.shop.xfjftotal' + host_configure_wx + uid_token,
	// 商家余额
	hssd_shop_yelist: host + 'hssd.shop.yelist' + host_configure_wx + uid_token,
	hssd_shop_yetotal: host + 'hssd.shop.yetotal' + host_configure_wx + uid_token,
	// 商家佣金
	hssd_shop_yjlist: host + 'hssd.shop.yjlist' + host_configure_wx + uid_token,
	hssd_shop_yjtotal: host + 'hssd.shop.yjtotal' + host_configure_wx + uid_token,
	// 会员数量
	hssd_shop_hylist: host + 'hssd.shop.hylist' + host_configure_wx + uid_token,
	hssd_shop_hytotal: host + 'hssd.shop.hytotal' + host_configure_wx + uid_token,
	// 商家收入
	hssd_shop_srlist: host + 'hssd.shop.srlist' + host_configure_wx + uid_token,
	hssd_shop_srtotal: host + 'hssd.shop.srtotal' + host_configure_wx + uid_token,
	// 积分收入
	hssd_shop_jfsrlist: host + 'hssd.shop.jfsrlist' + host_configure_wx + uid_token,
	hssd_shop_jfsrtotal: host + 'hssd.shop.jfsrtotal' + host_configure_wx + uid_token,
	// 积分直推
	hssd_shop_jfztlist: host + 'hssd.shop.jfztlist' + host_configure_wx + uid_token,
	hssd_shop_jfzttotal: host + 'hssd.shop.jfzttotal' + host_configure_wx + uid_token,
	// 积分间推
	hssd_shop_jfjtlist: host + 'hssd.shop.jfjtlist' + host_configure_wx + uid_token,
	hssd_shop_jfjttotal: host + 'hssd.shop.jfjttotal' + host_configure_wx + uid_token,
	// 积分团队
	hssd_shop_jftdlist: host + 'hssd.shop.jftdlist' + host_configure_wx + uid_token,
	hssd_shop_jftdtotal: host + 'hssd.shop.jftdtotal' + host_configure_wx + uid_token,
	// 现金收入
	hssd_shop_xjsrlist: host + 'hssd.shop.xjsrlist' + host_configure_wx + uid_token,
	hssd_shop_xjsrtotal: host + 'hssd.shop.xjsrtotal' + host_configure_wx + uid_token,
}

function padDate(p) {
	return p > 10 ? p : '0' + p
}

//数字格式化
function toThousands(num) {
	return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,');
}

function formatMoney(money, symbol, decimals){
	decimals = decimals || 2
	symbol = symbol || ''
	let result = money
		.toFixed(decimals)
		.replace(/\B(?=(\d{3})+\b)/g, ",")
		.replace(/^/, `${symbol}`);
	return result;
}

function getJsonLength(jsonData) {
	var jsonLength = 0;
	for (var item in jsonData) {
		jsonLength++;
	}
	return jsonLength;
}

//loading
function loading() {
	layer.load(1, {
		shade: [0.5, '#000'] //0.1透明度的白色背景
	})
}
//close loading
function closeloading() {
	layer.closeAll('loading');
}

//error show
function errorshow() {
	layer.msg('网络环境不好，走丢了！', {
		'icon': 5
	})
}

function formatDate() {
	var value = new Date();
	var year = value.getFullYear();
	var month = padDate(value.getMonth() + 1);
	var day = padDate(value.getDate());
	var hour = padDate(value.getHours());
	var minutes = padDate(value.getMinutes());
	var seconds = padDate(value.getSeconds());
	return year + '-' + month + '-' + day;
}

function DateDiff(sDate1, sDate2) { //sDate1和sDate2是2006-12-18格式  
	var aDate, oDate1, oDate2, iDays
	aDate = sDate1.split("-")
	oDate1 = new Date(aDate[0], aDate[1], aDate[2]) //转换为12-18-2006格式  
	aDate = sDate2.split("-")
	oDate2 = new Date(aDate[0], aDate[1], aDate[2])
	iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) //把相差的毫秒数转换为天数  
	return iDays
}
//获取url参数
/*function getParam(name) {
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
	var r = window.location.search.substr(1).match(reg); //匹配目标参数
	if (r != null) return unescape(r[2]);
	return null; //返回参数值
}*/
//解决乱码问题
function getParam(name) {
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
	var r = window.location.search.substr(1).match(reg); //匹配目标参数
	if (r != null) return decodeURI(r[2]);
	return null; //返回参数值
}
layui.use(['form', 'layedit', 'laydate', 'element'], function() {
	var $ = layui.$,
		admin = layui.admin,
		upload = layui.upload,
		element = layui.element,
		form = layui.form;



	// 创建一个Select
	window.createSelect = function(optionData, selectname) {
		var html = '';
		html += '<div class="layui-input-inline">';
		html += ' <select lay-filter=' + selectname + ' lay-verify="required" name=' + selectname + '>';
		// html += '  <option value="">请选择</option>';
		for (var i = 0; i < optionData.length; i++) {
			html += ' <option value=' + optionData[i].name + ' title=' + optionData[i].id + '>' +
				optionData[i].name +
				'</option>';
		}
		html += ' </select>';
		html += '</div>';
		return html;
	}
	/* 返佣类型 */
	window.orders_fee_type_show = function(type, data) {
		if (map.orders_fee_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.orders_fee_type.length; i++) {
						if (data == map.orders_fee_type[i].value) {
							return map.orders_fee_type[i].name;
						}
					}
				} else {
					return ''
				}
			}
		}
	}
	/* 开关状态 */
	window.site_union_show = function(type, data) {
		$.ajax({
			type: "get",
			url: server.site_union_query,
			async: false,
			success: function(res) {
				if (res.code == 0) {
					var union = res.site_union.data;
					if (union.length > 0) {
						if (type == 1) {
							if (String(data)) {
								for (var i = 0; i < union.length; i++) {
									if (data == union[i].grade) {
										return '<span  style="color:' + union[i].title_color +
											';"> ' + union[i].name + '</span>';
									}
								}
							} else {
								return ''
							}
						} else {
							var on_off_html = type == 'option' ?
								'<option value="">全部</option>' : '';
							for (var i = 0; i < union.length; i++) {
								switch (type) {
									case 'option':
										on_off_html += '<option value=' + union[i].grade +
											' title=' + union[i].name + '>' + union[
												i].name + '</option>'
										break;
									case 'radio':
										on_off_html +=
											'<input type="radio" name="level" value=' + union[i]
											.grade + ' title=' + union[
												i].name + ' checked>'
										break;
									default:
										break;
								}
							}
							$(".site_union").append(on_off_html);
							form.render('select')
							form.render('radio')
						}
					}
				}
			}
		});
	}

	/* 服务订单颜色 */
	window.service_order_color_show = function(type, data) {
		if (map.service_order.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.service_order.length; i++) {
						if (data == map.service_order[i].value) {
							return map.service_order[i].code;
						}
					}
				} else {
					return ''
				}
			}
		}
	}
	/* 开关状态 */
	window.on_off_show = function(type, data) {
		if (map.on_off.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.on_off.length; i++) {
						if (data == map.on_off[i].value) {
							return map.on_off[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var on_off_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.on_off.length; i++) {
					switch (type) {
						case 'option':
							on_off_html += '<option value=' + map.on_off[i].value + ' title=' + map.on_off[
								i].id + '>' + map.on_off[
								i].name + '</option>'
							break;
						case 'radio':
							on_off_html += '<input type="radio" name="on_off" value=' + map.on_off[i]
								.value + ' title=' + map.on_off[
									i].name + ' checked>'
							break;
						default:
							break;
					}
				}
				$(".on_off").append(on_off_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 佣金状态 */
	window.fee_status_show = function(type, data) {
		if (map.fee_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.fee_status.length; i++) {
						if (data == map.fee_status[i].value) {
							return map.fee_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var fee_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.fee_status.length; i++) {
					switch (type) {
						case 'option':
							fee_type_html += '<option value=' + map.fee_status[i].value + ' title=' + map
								.fee_status[i].id + '>' + map.fee_status[
									i].name + '</option>'
							break;
						case 'radio':
							fee_type_html += '<input type="radio" name="status" value=' + map.fee_status[i]
								.value + ' title=' + map.fee_status[
									i].name + ' checked>'
							break;
						default:
							break;
					}
				}
				$(".fee_status").append(fee_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 商品状态 */
	window.goods_status_show = function(type, data) {
		if (map.goods_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.goods_status.length; i++) {
						if (data == map.goods_status[i].value) {
							return map.goods_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var goods_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.goods_status.length; i++) {
					switch (type) {
						case 'option':
							goods_status_html += '<option value=' + map.goods_status[i].value + ' title=' +
								map.goods_status[i].id + '>' +
								map.goods_status[i].name + '</option>'
							break;
						case 'radio':
							goods_status_html += '<input type="radio" name="status" value=' + map
								.goods_status[i].value + ' title=' + map
								.goods_status[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".goods_status").append(goods_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 商品类型*/
	window.goods_type_show = function(type, data) {
		if (map.goods_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.goods_type.length; i++) {
						if (data == map.goods_type[i].value) {
							return map.goods_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var goods_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.goods_type.length; i++) {
					switch (type) {
						case 'option':
							goods_status_html += '<option value=' + map.goods_type[i].value + ' title=' +
								map.goods_type[i].id + '>' +
								map.goods_type[i].name + '</option>'
							break;
						case 'radio':
							goods_status_html +=
								'<input lay-filter="type" type="radio" name="type" value=' + map.goods_type[
									i].value + ' title=' + map
								.goods_type[i].name + ' checked>'
							break;
						default:
							break;
					}
				}
				$(".goods_type").append(goods_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	window.fq_status_show = function(type, data) {
		if (map.fq_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.fq_status.length; i++) {
						if (data == map.fq_status[i].value) {
							return map.fq_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var fq_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.fq_status.length; i++) {
					switch (type) {
						case 'option':
							fq_status_html += '<option value=' + map.fq_status[i].value + ' title=' + map
								.fq_status[i].id + '>' +
								map.fq_status[i].name + '</option>'
							break;
						case 'radio':
							fq_status_html += '<input lay-filter="type" type="radio" name="fq" value=' + map
								.fq_status[i].value + ' title=' + map
								.fq_status[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".fq_status").append(fq_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 活动类型 */
	window.seckill_type_show = function(type, data) {
		if (map.fee_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.seckill_type.length; i++) {
						if (data == map.seckill_type[i].value) {
							return map.seckill_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var seckill_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.seckill_type.length; i++) {
					switch (type) {
						case 'option':
							seckill_type_html += '<option value=' + map.seckill_type[i].value + ' title=' +
								map.seckill_type[i].id +
								'>' + map.seckill_type[
									i].name + '</option>'
							break;
						case 'radio':
							seckill_type_html += '<input type="radio" name="seckill_type" value=' + map
								.seckill_type[i].value + ' title=' + map
								.seckill_type[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".seckill_type").append(seckill_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	window.seckill_type_show_shop = function(type, data) {
		if (map.fee_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.seckill_type.length; i++) {
						if (data == map.seckill_type[i].value) {
							return map.seckill_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var seckill_type_html = type == 'option' ? '<option value="" disabled>全部</option>' : '';
				for (var i = 0; i < map.seckill_type.length; i++) {
					switch (type) {
						case 'option':
							seckill_type_html += '<option value=' + map.seckill_type[i].value + ' title=' +
								map.seckill_type[i].id +
								'disabled >' + map.seckill_type[
									i].name + '</option>'
							break;
						case 'radio':
							seckill_type_html += '<input type="radio" name="seckill_type" value=' + map
								.seckill_type[i].value + ' title=' + map
								.seckill_type[i].name + 'disabled >'
							break;
						default:
							break;
					}
				}
				$(".seckill_type").append(seckill_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	/* 信用卡标志类型 */
	window.card_type_show = function(type, data) {
		if (map.card_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.card_type.length; i++) {
						if (data == map.card_type[i].value) {
							return map.card_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var card_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.card_type.length; i++) {
					switch (type) {
						case 'option':
							card_type_html += '<option value=' + map.card_type[i].value + ' title=' + map
								.card_type[i].id +
								'>' + map.card_type[
									i].name + '</option>'
							break;
						case 'radio':
							card_type_html += '<input type="radio" name="type" value=' + map.card_type[i]
								.value + ' title=' + map
								.card_type[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".card_type").append(card_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 产品状态 */
	window.product_status_show = function(type, data) {
		if (map.product_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.product_status.length; i++) {
						if (data == map.product_status[i].value) {
							return map.product_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var product_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.product_status.length; i++) {
					switch (type) {
						case 'option':
							product_status_html += '<option value=' + map.product_status[i].value +
								' title=' + map.product_status[i].id +
								'>' + map.product_status[
									i].name + '</option>'
							break;
						case 'radio':
							product_status_html += '<input type="radio" name="status" value=' + map
								.product_status[i].value + ' title=' + map
								.product_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".product_status").append(product_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	/* 快递公司 */
	window.delivery_show = function() {
		$.ajax({
			type: "get",
			url: server.querydelivery,
			async: false,
			success: function(res) {
				if (res.code == 0) {
					var delivery_unit = res.delivery_unit.data;
					if (delivery_unit.length > 0) {
						var delivery_unit_html = '<option value="">请选择快递公司</option>';
						for (var i = 0; i < delivery_unit.length; i++) {
							delivery_unit_html += '<option value=' + delivery_unit[i].id + '>' +
								delivery_unit[
									i].name + '</option>'
						}
						$(".delivery_unit").append(delivery_unit_html);
						form.render('select')
					}
				}
			}
		});
	}

	window.service_order_show = function(type, data) {
		if (map.service_order.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.service_order.length; i++) {
						if (data == map.service_order[i].value) {
							return map.service_order[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var service_order_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.service_order.length; i++) {
					switch (type) {
						case 'option':
							service_order_html += '<option value=' + map.service_order[i].value +
								' title=' + map.service_order[i].id +
								'>' + map.service_order[i].name + '</option>'
							break;
						case 'radio':
							service_order_html += '<input type="radio" name="status" value=' + map
								.service_order[i].value + ' title=' +
								map.service_order[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".service_order").append(service_order_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	/* 交易状态 */
	window.trade_status_show = function(type, data) {
		if (map.trade_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.trade_status.length; i++) {
						if (data == map.trade_status[i].value) {
							return map.trade_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var trade_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.trade_status.length; i++) {
					switch (type) {
						case 'option':
							trade_status_html += '<option value=' + map.trade_status[i].value + ' title=' +
								map.trade_status[i].id + '>' +
								map.trade_status[i].name + '</option>'
							break;
						case 'radio':
							trade_status_html += '<input type="radio" name="status" value=' + map
								.trade_status[i].value + ' title=' +
								map.trade_status[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".trade_status").append(trade_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	/* 图标分组 */
	window.account_show = function(type) {
		$.ajax({
			url: server.sys_account_account,
			type: 'post',
			dataType: 'json',
			success: function(data) {
				if (data.code == '0') {
					var html = '';
					var rolehtml = type == 'option' ? '<option value="">全部</option>' : '';
					switch (type) {
						case 'radio':
							for (var i = 0; i < getJsonLength(data.account.data); i++) {
								html +=
									'<input type="radio" name="accountid" id="accountid" value=' +
									data.account.data[i].accountid + ' title=' + data.account
									.data[i].accountname + '>'
							}
							break;
						case 'option':
							for (var i = 0; i < data.length; i++) {
								rolehtml += '<option value=' + data.account.data[i].accountid +
									'>' +
									data.account.data[i].accountname + '</option>'
							}
							break;
						default:

							break;
					}
					$(".accountid").append(html);
					form.render('select')
					form.render('radio')
					if (_data.id) {
						initdata();
					}
					closeloading();
				} else {
					layer.msg('服务器错误');
				}
			},
			'error': function() {
				layer.msg('系统错误');
				closeloading();
			}
		})
	}
	/* 图标分组 */
	window.site_icon_group_show = function(type, data) {
		$.get(server.site_group_select, data,
			function(res, status) {
				if (status == 'success') {
					if (res.code == 0) {
						var data = res.group.data;
						var rolehtml = type == 'option' ? '<option value="">全部</option>' : '';
						switch (type) {
							case 'html':
								var getTpl = demo_ul.innerHTML,
									view = document.getElementById('view_ul');
								laytpl(getTpl).render(data, function(html) {
									view.innerHTML = html;
								});
								break;
							case 'option':
								for (var i = 0; i < data.length; i++) {
									rolehtml += '<option value=' + data[i].id + '>' +
										data[i].name + '</option>'
								}
								break;
							default:
								break;
						}
						$(".site_icon_group").append(rolehtml);
						form.render('select')
						form.render('radio')
						element.init();
					}
					closeloading();
				} else {
					layer.msg('服务器连接错误');
				}
			});
	}
	/* orders_vip_status VIP订单状态 */
	window.orders_vip_status_show = function(type, data) {
		if (map.orders_vip_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.orders_vip_status.length; i++) {
						if (data == map.orders_vip_status[i].value) {
							return map.orders_vip_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var bind_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.orders_vip_status.length; i++) {
					switch (type) {
						case 'option':
							bind_status_html += '<option value=' + map.orders_vip_status[i].value +
								' title=' + map.orders_vip_status[i].id +
								'>' + map.orders_vip_status[
									i].name + '</option>'
							break;
						case 'radio':
							bind_status_html += '<input type="radio" name="status" value=' + map
								.orders_vip_status[i].value + ' title=' + map
								.orders_vip_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".orders_vip_status").append(bind_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 订单类型 */
	window.order_type = function(data) {
		if (String(data)) {
			for (var i = 0; i < map.goods_type.length; i++) {
				if (data == map.goods_type[i].value) {
					return map.goods_type[i].name;
				}
			}
		} else {
			return ''
		}
	}
	/* 账户类型 */
	window.accoun_type_show = function(type, data) {
		if (map.accoun_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.accoun_type.length; i++) {
						if (data == map.accoun_type[i].value) {
							return map.accoun_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var accoun_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.accoun_type.length; i++) {
					switch (type) {
						case 'option':
							accoun_type_html += '<option value=' + map.accoun_type[i].value + ' title=' +
								map.accoun_type[i].id + '>' +
								map.accoun_type[i].name + '</option>'
							break;
						case 'radio':
							accoun_type_html += '<input type="radio" name="accountid" value=' + map
								.accoun_type[i].value + ' title=' +
								map.accoun_type[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".accoun_type").append(accoun_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}


	var map = {};
	initdata();

	function initdata() {
		if (localStorage.getItem('lsmap')) {
			map = JSON.parse(localStorage.getItem('lsmap'))
		} else {
			$.ajax({
				type: "get",
				url: server.querymap,
				async: false,
				success: function(res) {
					if (res.code == 0) {
						map = res.dict_libraries_list.data;
						localStorage.setItem('lsmap', JSON.stringify(map))
					} else {
						layer.msg(res.msg);
					}
				}
			});
		}
	}
	/*图标显示*/
	window.icon_type_show = function(type, data) {
		if (map.icon_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.icon_type.length; i++) {
						if (data == map.icon_type[i].value) {
							return map.icon_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var icon_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.icon_type.length; i++) {
					switch (type) {
						case 'option':
							icon_type_html += '<option value=' + map.icon_type[i].value + ' title=' + map
								.icon_type[i].id + '>' +
								map.icon_type[i].name + '</option>'
							break;
						case 'radio':
							icon_type_html += '<input type="radio" name="icon_type" value=' + map.icon_type[
									i].value + ' title=' +
								map.icon_type[i].name + '>'
							break;
						case 'checkbox':
							icon_type_html +=
								'<input lay-skin="primary" lay-filter="type" type="checkbox"   name="client' +
								map.icon_type[i]
								.value +
								'" value=' + map.icon_type[i].value + ' title=' + map.icon_type[i].name +
								'>'
							break;
						default:
							break;
					}
				}
				$(".icon_type").append(icon_type_html);
				form.render('select')
				form.render('radio')
				form.render('checkbox')
			}
		}
	}

	window.icon_type_show_shop = function(type, data) {
		if (map.icon_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.icon_type.length; i++) {
						if (data == map.icon_type[i].value) {
							return map.icon_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var icon_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.icon_type.length; i++) {
					switch (type) {
						case 'option':
							icon_type_html += '<option disabled value=' + map.icon_type[i].value +
								' title=' + map.icon_type[i].id + '>' +
								map.icon_type[i].name + '</option>'
							break;
						case 'radio':
							icon_type_html += '<input type="radio" name="icon_type" disabled value=' + map
								.icon_type[i].value + ' title=' +
								map.icon_type[i].name + '>'
							break;
						case 'checkbox':
							icon_type_html +=
								'<input lay-skin="primary" lay-filter="type" type="checkbox" checked disabled  name="client' +
								map.icon_type[i]
								.value +
								'" value=' + map.icon_type[i].value + ' title=' + map.icon_type[i].name +
								'>'
							break;
						default:
							break;
					}
				}
				$(".icon_type").append(icon_type_html);
				form.render('select')
				form.render('radio')
				form.render('checkbox')
			}
		}
	}

	window.icon_client_show = function(type, data) {
		if (map.icon_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.icon_type.length; i++) {
						if (data == map.icon_type[i].value) {
							return map.icon_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var icon_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.icon_type.length; i++) {
					switch (type) {
						case 'option':
							icon_type_html += '<option value=' + map.icon_type[i].value + ' title=' + map
								.icon_type[i].id + '>' +
								map.icon_type[i].name + '</option>'
							break;
						case 'radio':
							icon_type_html += '<input type="radio" name="icon_type" value=' + map.icon_type[
									i].value + ' title=' +
								map.icon_type[i].name + '>'
							break;
						case 'checkbox':
							icon_type_html +=
								'<input lay-skin="primary" lay-filter="type" type="checkbox" checked  name="type' +
								map.icon_type[i]
								.value +
								'" value=' + map.icon_type[i].value + ' title=' + map.icon_type[i].name +
								'>'
							break;
						default:
							break;
					}
				}
				$(".icon_client").append(icon_type_html);
				form.render('select')
				form.render('radio')
				form.render('checkbox')
			}
		}
	}
	/* 服务费提现状态 */
	window.service_status_show = function(type, data) {
		if (map.service_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.service_status.length; i++) {
						if (data == map.service_status[i].value) {
							return map.service_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var service_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.service_status.length; i++) {
					switch (type) {
						case 'option':
							service_status_html += '<option value=' + map.service_status[i].value +
								' title=' + map.service_status[i].id +
								'>' + map.service_status[
									i].name + '</option>'
							break;
						case 'radio':
							service_status_html += '<input type="radio" name="service_status" value=' + map
								.service_status[i].value + ' title=' + map
								.service_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".service_status").append(service_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 用户角色 */
	window.initroledatashow = function(type) {
		$.get(server.querymember_role, {
			type: 'AGENT'
		}, function(res, status) {
			if (status == 'success') {
				if (res.code == 0) {
					var data = res.member_role_list.data;
					var rolehtml = type == 'option' ? '<option value="">全部</option>' : '';
					switch (type) {
						case 'html':
							var getTpl = demo_ul.innerHTML,
								view = document.getElementById('view_ul');
							laytpl(getTpl).render(data, function(html) {
								view.innerHTML = html;
							});
							break;
						case 'option':
							for (var i = 0; i < data.length; i++) {
								rolehtml += '<option value=' + data[i].id + '>' +
									data[i].name + '</option>'
							}
							break;
						default:
							break;
					}
					$(".role").append(rolehtml);
					form.render('select')
					form.render('radio')
					element.init();
				}
				closeloading();
			} else {
				layer.msg('服务器连接错误');
			}
		});
	}

	/* 伙伴等级 */
	window.initsite_unionshow = function(type, data) {
		var datalist = [];
		$.ajax({
			type: "get",
			url: server.querysite_union,
			async: false,
			success: function(res) {
				if (res.code == 0) {
					var data = res.site_union.data;
					datalist = data
					var gradehtml = type == 'option' ? '<option value="">全部</option>' : '';
					switch (type) {
						case 'html':
							var getTpl = demo_ul.innerHTML,
								view = document.getElementById('view_ul');
							laytpl(getTpl).render(data, function(html) {
								view.innerHTML = html;
							});
							break;
						case 'option':
							for (var i = 0; i < data.length; i++) {
								gradehtml += '<option value=' + data[i].grade + '>' + data[i]
									.title + '</option>'
							}
							break;
						default:
							break;
					}
					$(".grade").append(gradehtml);
					form.render('select')
					form.render('radio')
					element.init();
				} else {
					layer.msg(res.msg);
				}
			}
		});
		if (type == 1) {
			if (String(data)) {
				for (var i = 0; i < datalist.length; i++) {
					if (data == datalist[i].grade) {
						return datalist[i].name;
					}
				}
			} else {
				return ''
			}
		}
	}

	/* 伙伴讲堂分类 */
	window.initnews_catshow = function(type) {
		$.get(server.querynews_cat, {}, function(res, status) {
			if (status == 'success') {
				if (res.code == 0) {
					var data = res.news_cat.data;
					var cathtml = type == 'option' ? '<option value="">全部</option>' : '';
					switch (type) {
						case 'html':
							var getTpl = demo_ul.innerHTML,
								view = document.getElementById('view_ul');
							laytpl(getTpl).render(data, function(html) {
								view.innerHTML = html;
							});
							break;
						case 'option':
							for (var i = 0; i < data.length; i++) {
								cathtml += '<option value=' + data[i].id + '>' +
									data[i].name + '</option>'
							}
							break;
						default:
							break;
					}
					$(".catid").append(cathtml);
					form.render('select')
					form.render('radio')
					element.init();
				} else {
					layer.msg(res.msg);
				}
				closeloading();
			} else {
				layer.msg('服务器连接错误');
			}
		});
	}
	/* 帮助中心分类 */
	window.inithelp_catshow = function(type) {
		$.get(server.listsite_help_cat, {}, function(res, status) {
			if (status == 'success') {
				if (res.code == 0) {
					var data = res.site_help_cat.data;
					var cathtml = '';
					switch (type) {
						case 'html':
							var getTpl = demo_ul.innerHTML,
								view = document.getElementById('view_ul');
							laytpl(getTpl).render(data, function(html) {
								view.innerHTML = html;
							});
							break;
						case 'option':
							cathtml = ' <option value="">全部</option> ';
							for (var i = 0; i < data.length; i++) {
								cathtml += '<option value=' + data[i].id + '>' +
									data[i].name + '</option>'
							}
							break;
						default:
							break;
					}
					$(".catid").append(cathtml);
					form.render('select')
					form.render('radio')
					element.init();
				} else {
					layer.msg(res.msg);
				}
				closeloading();
			} else {
				layer.msg('服务器连接错误');
			}
		});
	}

	/* 产品 */
	window.initproductshow = function(type) {
		$.get(server.queryproduct, {}, function(res, status) {
			if (status == 'success') {
				if (res.code == 0) {
					var data = res.product.data;
					var producthtml = type == 'option' ? '<option value="">全部</option>' : '';
					switch (type) {
						case 'html':
							var getTpl = demo_ul.innerHTML,
								view = document.getElementById('view_ul');
							laytpl(getTpl).render(data, function(html) {
								view.innerHTML = html;
							});
							break;
						case 'option':
							for (var i = 0; i < data.length; i++) {
								producthtml += '<option value=' + data[i].spuid + '>' +
									data[i].spuname + '</option>'
							}
							break;
						default:
							break;
					}
					$(".product").append(producthtml);
					form.render('select')
					form.render('radio')
					element.init();
				} else {
					layer.msg(res.msg);
				}
				closeloading();
			} else {
				layer.msg('服务器连接错误');
			}
		});
	}

	/* 产品 */
	window.initproductshow1 = function(type) {
		$.get(server.queryproduct_radio, {}, function(res, status) {
			if (status == 'success') {
				if (res.code == 0) {
					var data = res.product_category.data;
					var producthtml = type == 'option' ? '<option value="">全部</option>' : '';
					switch (type) {
						case 'html':
							var getTpl = demo_ul.innerHTML,
								view = document.getElementById('view_ul');
							laytpl(getTpl).render(data, function(html) {
								view.innerHTML = html;
							});
							break;
						case 'option':
							for (var i = 0; i < data.length; i++) {
								producthtml += '<option value=' + data[i].id + '>' +
									data[i].code + '</option>'
							}
							break;
						case 'radio':
							for (var i = 0; i < data.length; i++) {
								producthtml += '<input type="radio" name="product" value=' + data[i]
									.id + ' title=' + data[i].code +
									'>'
							}
							break;
						default:
							break;
					}
					$(".product").append(producthtml);
					form.render('select')
					form.render('radio')
					element.init();
				} else {
					layer.msg(res.msg);
				}
				closeloading();
			} else {
				layer.msg('服务器连接错误');
			}
		});
	}

	/* 总的showmap */
	/*window.map_show = function(maplist, domname, type, radioname) {
		var map_list = maplist;
		if(maplist.length > 0) {
			var map_html = type == 'option' ? '<option value="">全部</option>' : '';
			for(var i = 0; i < maplist.length; i++) {
				switch(type) {
					case 'option':
						map_html += '<option value=' + maplist[i].value + ' title=' + maplist[i].id + '>' +
							maplist[i].name + '</option>'
						break;
					case 'radio':
						map_html += '<input type="radio" name=' + radioname + ' value=' + maplist[i].value + ' title=' + maplist[
							i].name + '>'
						break;
					default:
						break;
				}
			}
			$("." + domname).append(map_html);
			form.render('select')
			form.render('radio')
		}
	}*/

	/* 字典匹配 */
	window.map_show = function(mapconfig) {
		//console.log(mapconfig.mapName);
		var mapArray = map[mapconfig.mapName];
		/* domType: 渲染dom类型 mapName:字典名称、渲染盒子dom的class data: 配置的数据值 isverify: 是否必填 */
		if (!mapconfig.domType) {
			if (String(mapconfig.data) && String(mapconfig.data) != 'undefined') {
				var name;
				for (var i = 0; i < mapArray.length; i++) {
					if (mapconfig.data == mapArray[i].value) {
						name = '<span style="color: ' + mapArray[i].notes + ' ">' + mapArray[i].name +
							'</span>';
					}
				}
				return name;
			} else {
				console.log('data不能为空');
				return ''
			}
		} else {
			var map_html = mapconfig.mapArray + '_html';
			map_html = mapconfig.domType == 'option' ? '<option value="">请选择</option>' : '';
			for (var i = 0; i < mapArray.length; i++) {
				switch (mapconfig.domType) {
					case 'option':
						map_html += '<option value=' + mapArray[i].value + ' title=' + mapArray[i].id +
							'>' + mapArray[i].name +
							'</option>'
						break;
					case 'radio':
						if (i == 0) {
							map_html += '<input checked lay-filter="' + mapconfig.domType +
								'" type="radio" name=' + mapconfig.fieldName +
								' value=' + mapArray[i].value + ' title=' + mapArray[i].name + '>'
						} else {
							map_html += '<input lay-filter="' + mapconfig.domType + '" type="radio" name=' +
								mapconfig.fieldName +
								' value=' + mapArray[i].value + ' title=' + mapArray[i].name + '>'
						}
						break;
					default:
						break;
				}
			}
			$("." + mapconfig.mapName).append(map_html);
			form.render('select')
			form.render('radio')
		}
	}
	/* 总的匹配 */
	window.map_matching_show = function(maplist, data) {
		var map_list1 = maplist;
		if (map_list1.length > 0) {
			if (String(data)) {
				for (var i = 0; i < map_list1.length; i++) {
					if (data == map_list1[i].value) {
						return map_list1[i].name;
					}
				}
			} else {
				return ''
			}
		}
	}

	/* 消息类型 */
	window.messages_type_show = function(type, data) {
		if (map.messages_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.messages_type.length; i++) {
						if (data == map.messages_type[i].value) {
							return map.messages_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var messages_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.messages_type.length; i++) {
					switch (type) {
						case 'option':
							messages_type_html += '<option value=' + map.messages_type[i].value +
								' title=' + map.messages_type[i].id +
								'>' + map.messages_type[
									i].name + '</option>'
							break;
						case 'radio':
							messages_type_html += '<input type="radio" name="type" value=' + map
								.messages_type[i].value + ' title=' + map
								.messages_type[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".messages_type").append(messages_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 支付方式 */
	window.payment_show = function(type, data) {
		if (map.payment.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.payment.length; i++) {
						if (data == map.payment[i].value) {
							return map.payment[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var payment_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.payment.length; i++) {
					switch (type) {
						case 'option':
							payment_html += '<option value=' + map.payment[i].value + ' title=' + map
								.payment[i].id + '>' + map.payment[i]
								.name + '</option>'
							break;
						case 'radio':
							payment_html += '<input type="radio" name="payment" value=' + map.payment[i]
								.value + ' title=' + map.payment[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".payment").append(payment_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	/* 商户类型 */
	window.merType_show = function(type, data) {
		if (map.merType.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.merType.length; i++) {
						if (data == map.merType[i].value) {
							return map.merType[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var merType_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.merType.length; i++) {
					switch (type) {
						case 'option':
							merType_html += '<option value=' + map.merType[i].value + ' title=' + map
								.merType[i].id + '>' + map.merType[
									i].name + '</option>'
							break;
						case 'radio':
							merType_html += '<input type="radio" name="mer_type" value=' + map.merType[i]
								.value + ' title=' + map.merType[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".merType").append(merType_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	/* 费率类型 */
	window.mer_ratetype_show = function(type, data) {
		if (map.mer_ratetype.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.mer_ratetype.length; i++) {
						if (data == map.mer_ratetype[i].value) {
							return map.mer_ratetype[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var mer_ratetype_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.mer_ratetype.length; i++) {
					switch (type) {
						case 'option':
							mer_ratetype_html += '<option value=' + map.mer_ratetype[i].value + ' title=' +
								map.mer_ratetype[i].id + '>' + map.mer_ratetype[
									i].name + '</option>'
							break;
						case 'radio':
							mer_ratetype_html += '<input type="radio" name="mer_ratetype" value=' + map
								.mer_ratetype[i].value + ' title=' + map.mer_ratetype[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".mer_ratetype").append(mer_ratetype_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	/* 是否 */
	window.other_status_show = function(type, data) {
		if (map.other_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.other_status.length; i++) {
						if (data == map.other_status[i].value) {
							return map.other_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var other_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.other_status.length; i++) {
					switch (type) {
						case 'option':
							other_status_html += '<option value=' + map.other_status[i].value + ' title=' +
								map.other_status[i].id + '>' + map.other_status[
									i].name + '</option>'
							break;
						case 'radio':
							other_status_html += '<input type="radio" name="status" value=' + map
								.other_status[i].value + ' title=' + map.other_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".other_status").append(other_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	/* 收支 */
	window.income_type_show = function(type, data) {
		if (map.income_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.income_type.length; i++) {
						if (data == map.income_type[i].value) {
							return map.income_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var income_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.income_type.length; i++) {
					switch (type) {
						case 'option':
							income_type_html += '<option value=' + map.income_type[i].value + ' title=' +
								map.income_type[i].id + '>' +
								map.income_type[i].name + '</option>'
							break;
						case 'radio':
							income_type_html += '<input type="radio" name="income" value=' + map
								.income_type[i].value + ' title=' + map.income_type[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".income_type").append(income_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 消息状态 */
	window.messages_status_show = function(type, data) {
		if (map.messages_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.messages_status.length; i++) {
						if (data == map.messages_status[i].value) {
							return map.messages_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var messages_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.messages_status.length; i++) {
					switch (type) {
						case 'option':
							messages_status_html += '<option value=' + map.messages_status[i].value +
								' title=' + map.messages_status[i].id +
								'>' + map.messages_status[
									i].name + '</option>'
							break;
						case 'radio':
							messages_status_html += '<input type="radio" name="status" value=' + map
								.messages_status[i].value + ' title=' +
								map.messages_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".messages_status").append(messages_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 认证类型 */
	window.truly_type_show = function(type, data) {
		if (map.truly_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.truly_type.length; i++) {
						if (data == map.truly_type[i].value) {
							return map.truly_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var truly_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.truly_type.length; i++) {
					switch (type) {
						case 'option':
							truly_type_html += '<option value=' + map.truly_type[i].value + ' title=' + map
								.truly_type[i].id + '>' + map.truly_type[
									i].name + '</option>'
							break;
						case 'radio':
							truly_type_html += '<input type="radio" name="type_id" value=' + map.truly_type[
								i].value + ' title=' + map.truly_type[
								i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".truly_type").append(truly_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	window.display_mode_show = function(type, data) {
		if (map.display_mode.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.display_mode.length; i++) {
						if (data == map.display_mode[i].value) {
							return map.display_mode[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var display_mode_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.display_mode.length; i++) {
					switch (type) {
						case 'option':
							display_mode_html += '<option value=' + map.display_mode[i].value + ' title=' +
								map.display_mode[i].id + '>' + map.display_mode[
									i].name + '</option>'
							break;
						case 'radio':
							display_mode_html += '<input type="radio" name="display_mode" value=' + map
								.display_mode[i].value + ' title=' + map.display_mode[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".display_mode").append(display_mode_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 认证状态 */
	window.truly_member_status_show = function(type, data) {
		if (map.truly_member_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.truly_member_status.length; i++) {
						if (data == map.truly_member_status[i].value) {
							return map.truly_member_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var truly_member_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.truly_member_status.length; i++) {
					switch (type) {
						case 'option':
							truly_member_status_html += '<option value=' + map.truly_member_status[i]
								.value + ' title=' + map.truly_member_status[
									i].id + '>' +
								map.truly_member_status[i].name + '</option>'
							break;
						case 'radio':
							truly_member_status_html += '<input type="radio" name="status" value=' + map
								.truly_member_status[i].value +
								' title=' + map
								.truly_member_status[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".truly_member_status").append(truly_member_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 代理商认证 */
	window.truly_status_show = function(type, data) {
		if (map.truly_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.truly_status.length; i++) {
						if (data == map.truly_status[i].value) {
							return map.truly_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var truly_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.truly_status.length; i++) {
					switch (type) {
						case 'option':
							truly_status_html += '<option value=' + map.truly_status[i].value + ' title=' +
								map.truly_status[
									i].id + '>' +
								map.truly_status[i].name + '</option>'
							break;
						case 'radio':
							truly_status_html += '<input type="radio" name="status" value=' + map
								.truly_status[i].value +
								' title=' + map
								.truly_status[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".truly_status").append(truly_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 卡类型 */
	window.push_pay_type_show = function(type, data) {
		if (map.push_pay_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.push_pay_type.length; i++) {
						if (data == map.push_pay_type[i].value) {
							return map.push_pay_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var push_pay_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.push_pay_type.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.push_pay_type[i].value != 3 && map.push_pay_type[i].value != 4) {
									push_pay_type_html += '<option value=' + map.push_pay_type[i].value +
										' title=' + map.push_pay_type[i].id +
										'>' +
										map.push_pay_type[i].name + '</option>'
								}
							} else {
								push_pay_type_html += '<option value=' + map.push_pay_type[i].value +
									' title=' + map.push_pay_type[i].id +
									'>' +
									map.push_pay_type[i].name + '</option>'
							}
							break;
						case 'radio':
							push_pay_type_html += '<input type="radio" name="pay_type" value=' + map
								.push_pay_type[i].value + ' title=' +
								map
								.push_pay_type[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".push_pay_type").append(push_pay_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	window.collections_record_show = function(type, data) {
		if (map.collections_record.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.collections_record.length; i++) {
						if (data == map.collections_record[i].value) {
							return map.collections_record[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var collections_record_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.collections_record.length; i++) {
					switch (type) {
						case 'option':
							collections_record_html += '<option value=' + map.collections_record[i].value +
								' title=' + map.collections_record[i].id +
								'>' + map.collections_record[
									i].name + '</option>'
							break;
						case 'radio':
							collections_record_html += '<input type="radio" name="status" value=' + map
								.collections_record[i].value + ' title=' + map
								.collections_record[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".collections_record").append(collections_record_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 交易状态 */
	window.push_ret_code_show = function(type, data) {
		if (map.push_ret_code.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.push_ret_code.length; i++) {
						if (data == map.push_ret_code[i].value) {
							return map.push_ret_code[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var push_ret_code_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.push_ret_code.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.push_ret_code[i].value != 3 && map.push_ret_code[i].value != 4) {
									push_ret_code_html += '<option value=' + map.push_ret_code[i].value +
										' title=' + map.push_ret_code[i].id +
										'>' +
										map.push_ret_code[i].name + '</option>'
								}
							} else {
								push_ret_code_html += '<option value=' + map.push_ret_code[i].value +
									' title=' + map.push_ret_code[i].id +
									'>' +
									map.push_ret_code[i].name + '</option>'
							}
							break;
						case 'radio':
							push_ret_code_html += '<input type="radio" name="ret_code" value=' + map
								.push_ret_code[i].value + ' title=' +
								map
								.push_ret_code[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".push_ret_code").append(push_ret_code_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 订单状态 */
	window.order_status_show = function(type, data) {
		if (map.order_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.order_status.length; i++) {
						if (data == map.order_status[i].value) {
							return '<span style="color: ' + map.order_status[i].notes + '">' + map
								.order_status[i].name + '</span>';
						}
					}
				} else {
					return ''
				}
			} else {
				var order_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.order_status.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.order_status[i].value != 3 && map.order_status[i].value != 4) {
									order_status_html += '<option value=' + map.order_status[i].value +
										' title=' + map.order_status[i].id +
										'>' +
										map.order_status[i].name + '</option>'
								}
							} else {
								order_status_html += '<option value=' + map.order_status[i].value +
									' title=' + map.order_status[i].id + '>' +
									map.order_status[i].name + '</option>'
							}
							break;
						case 'radio':
							order_status_html += '<input type="radio" name="status" value=' + map
								.order_status[i].value + ' title=' + map
								.order_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".order_status").append(order_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 商户状态 */
	window.merchant_status_show = function(type, data) {
		if (map.merchant_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.merchant_status.length; i++) {
						if (data == map.merchant_status[i].value) {
							return map.merchant_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var merchant_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.merchant_status.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.merchant_status[i].value != 3 && map.merchant_status[i].value !=
									4) {
									merchant_status_html += '<option value=' + map.merchant_status[i]
										.value + ' title=' + map.merchant_status[i]
										.id + '>' +
										map.merchant_status[i].name + '</option>'
								}
							} else {
								merchant_status_html += '<option value=' + map.merchant_status[i].value +
									' title=' + map.merchant_status[i]
									.id + '>' +
									map.merchant_status[i].name + '</option>'
							}
							break;
						case 'radio':
							merchant_status_html += '<input type="radio" name="status" value=' + map
								.merchant_status[i].value + ' title=' +
								map
								.merchant_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".merchant_status").append(merchant_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 服务类型 */
	window.service_type_show = function(type, data) {
		if (map.service_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.service_type.length; i++) {
						if (data == map.service_type[i].value) {
							return map.service_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var service_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.service_type.length; i++) {
					switch (type) {
						case 'option':
							service_type_html += '<option value=' + map.service_type[i].value + ' title=' +
								map.service_type[i].id + '>' + map.service_type[
									i].name + '</option>'
							break;
						case 'radio':
							service_type_html += '<input type="radio" name="type" value=' + map
								.service_type[i].value + ' title=' + map.service_type[
									i].name + '>'
							break;
						case 'checkbox':
							service_type_html +=
								'<input lay-skin="primary" lay-filter="type" type="checkbox" name="type' +
								map.service_type[i]
								.value +
								'" value=' + map.service_type[i].value + ' title=' + map.service_type[i]
								.name + '>'
							break;
						default:
							break;
					}
				}
				$(".service_type").append(service_type_html);
				form.render('select')
				form.render('radio')
				form.render('checkbox')
			}
		}
	}
	/* 会员类型 */
	window.member_type_show = function(type, data) {
		if (map.member_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.member_type.length; i++) {
						if (data == map.member_type[i].value) {
							return map.member_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var member_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.member_type.length; i++) {
					switch (type) {
						case 'option':
							member_type_html += '<option value=' + map.member_type[i].value + ' title=' +
								map.member_type[i].id + '>' +
								map.member_type[i].name + '</option>'
							break;
						case 'radio':
							member_type_html += '<input type="radio" name="member_sub_type" value=' + map
								.member_type[i].value + ' title=' +
								map.member_type[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".member_type").append(member_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	window.member_sub_type_show = function(type, data) {
		if (map.member_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.member_type.length; i++) {
						if (data == map.member_type[i].value) {
							return map.member_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var member_sub_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.member_type.length; i++) {
					switch (type) {
						case 'option':
							member_sub_type_html += '<option value=' + map.member_type[i].value +
								' title=' + map.member_type[i].id + '>' +
								map.member_type[i].name + '</option>'
							break;
						case 'radio':
							member_sub_type_html += '<input type="radio" name="sub_type" value=' + map
								.member_type[i].value + ' title=' +
								map.member_type[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".member_sub_type").append(member_sub_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 启用停用 */
	window.on_off_show = function(type, data) {
		if (map.on_off.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.on_off.length; i++) {
						if (data == map.on_off[i].value) {
							return map.on_off[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var on_off_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.on_off.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.on_off[i].value != 3 && map.on_off[i].value != 4) {
									on_off_html += '<option value=' + map.on_off[i].value + ' title=' + map
										.on_off[i].id + '>' +
										map.on_off[i].name + '</option>'
								}
							} else {
								on_off_html += '<option value=' + map.on_off[i].value + ' title=' + map
									.on_off[i].id + '>' +
									map.on_off[i].name + '</option>'
							}
							break;
						case 'radio':
							on_off_html += '<input type="radio" name="status" value=' + map.on_off[i]
								.value + ' title=' + map
								.on_off[i].name + ' checked>'
							break;
						default:
							break;
					}
				}
				$(".on_off").append(on_off_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	window.on_off_show_shop = function(type, data) {
		if (map.on_off.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.on_off.length; i++) {
						if (data == map.on_off[i].value) {
							return map.on_off[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var on_off_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.on_off.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.on_off[i].value != 3 && map.on_off[i].value != 4) {
									on_off_html += '<option value=' + map.on_off[i].value + ' title=' + map
										.on_off[i].id + 'disabled >' +
										map.on_off[i].name + '</option>'
								}
							} else {
								on_off_html += '<option value=' + map.on_off[i].value + ' title=' + map
									.on_off[i].id + 'disabled >' +
									map.on_off[i].name + '</option>'
							}
							break;
						case 'radio':
							on_off_html += '<input type="radio" name="status" value=' + map.on_off[i]
								.value + ' title=' + map
								.on_off[i].name + ' checked disabled >'
							break;
						default:
							break;
					}
				}
				$(".on_off").append(on_off_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 性别 */
	window.sex_show = function(type, data) {
		if (map.sex.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.sex.length; i++) {
						if (data == map.sex[i].value) {
							return map.sex[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var sex_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.sex.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.sex[i].value != 3 && map.sex[i].value != 4) {
									sex_html += '<option value=' + map.sex[i].value + ' title=' + map.sex[i]
										.id + '>' +
										map.sex[i].name + '</option>'
								}
							} else {
								sex_html += '<option value=' + map.sex[i].value + ' title=' + map.sex[i]
									.id + '>' +
									map.sex[i].name + '</option>'
							}
							break;
						case 'radio':
							sex_html += '<input type="radio" name="sex" value=' + map.sex[i].value +
								' title=' + map
								.sex[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".sex").append(sex_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 提现银行卡状态 */
	window.bank_card_status_show = function(type, data) {
		if (map.bank_card_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.bank_card_status.length; i++) {
						if (data == map.bank_card_status[i].value) {
							return map.bank_card_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var bank_card_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.bank_card_status.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.bank_card_status[i].value != 3 && map.bank_card_status[i].value !=
									4) {
									bank_card_status_html += '<option value=' + map.bank_card_status[i]
										.value + ' title=' + map.bank_card_status[
											i].id + '>' +
										map.bank_card_status[i].name + '</option>'
								}
							} else {
								bank_card_status_html += '<option value=' + map.bank_card_status[i].value +
									' title=' + map.bank_card_status[
										i].id + '>' +
									map.bank_card_status[i].name + '</option>'
							}
							break;
						case 'radio':
							bank_card_status_html += '<input type="radio" name="status" value=' + map
								.bank_card_status[i].value +
								' title=' + map
								.bank_card_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".bank_card_status").append(bank_card_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 提现申请状态 */
	window.record_status_show = function(type, data) {
		if (map.record_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.record_status.length; i++) {
						if (data == map.record_status[i].value) {
							return map.record_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var record_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.record_status.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.record_status[i].value != 3 && map.record_status[i].value != 4) {
									record_status_html += '<option value=' + map.record_status[i].value +
										' title=' + map.record_status[i].id +
										'>' +
										map.record_status[i].name + '</option>'
								}
							} else {
								record_status_html += '<option value=' + map.record_status[i].value +
									' title=' + map.record_status[i].id +
									'>' +
									map.record_status[i].name + '</option>'
							}
							break;
						case 'radio':
							record_status_html += '<input type="radio" name="status" value=' + map
								.record_status[i].value + ' title=' +
								map
								.record_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".record_status").append(record_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 提现结算状态 */
	window.record_settle_status_show = function(type, data) {
		if (map.record_settle_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.record_settle_status.length; i++) {
						if (data == map.record_settle_status[i].value) {
							return map.record_settle_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var record_settle_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.record_settle_status.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.record_settle_status[i].value != 3 && map.record_settle_status[i]
									.value != 4) {
									record_settle_status_html += '<option value=' + map
										.record_settle_status[i].value + ' title=' + map
										.record_settle_status[
											i].id + '>' +
										map.record_settle_status[i].name + '</option>'
								}
							} else {
								record_settle_status_html += '<option value=' + map.record_settle_status[i]
									.value + ' title=' + map.record_settle_status[
										i].id + '>' +
									map.record_settle_status[i].name + '</option>'
							}
							break;
						case 'radio':
							record_settle_status_html += '<input type="radio" name="status_settle" value=' +
								map.record_settle_status[i].value +
								' title=' + map
								.record_settle_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".record_settle_status").append(record_settle_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 交易类型 */
	window.trans_type_show = function(type, data) {
		if (map.trans_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.trans_type.length; i++) {
						if (data == map.trans_type[i].value) {
							return map.trans_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var trans_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.trans_type.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.trans_type[i].value != 3 && map.trans_type[i].value != 4) {
									trans_type_html += '<option value=' + map.trans_type[i].value +
										' title=' + map.trans_type[i].id + '>' +
										map.trans_type[i].name + '</option>'
								}
							} else {
								trans_type_html += '<option value=' + map.trans_type[i].value + ' title=' +
									map.trans_type[i].id + '>' +
									map.trans_type[i].name + '</option>'
							}
							break;
						case 'radio':
							trans_type_html += '<input type="radio" name="order_type" value=' + map
								.trans_type[i].value + ' title=' + map
								.trans_type[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".trans_type").append(trans_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	window.trade_type_show = function(type, data) {
		if (map.trade_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.trade_type.length; i++) {
						if (data == map.trade_type[i].value) {
							return map.trade_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var trade_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.trade_type.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.trade_type[i].value != 3 && map.trade_type[i].value != 4) {
									trade_type_html += '<option value=' + map.trade_type[i].value +
										' title=' + map.trade_type[i].id + '>' +
										map.trade_type[i].name + '</option>'
								}
							} else {
								trade_type_html += '<option value=' + map.trade_type[i].value + ' title=' +
									map.trade_type[i].id + '>' +
									map.trade_type[i].name + '</option>'
							}
							break;
						case 'radio':
							trade_type_html += '<input type="radio" name="trade_type" value=' + map
								.trade_type[i].value + ' title=' + map
								.trade_type[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".trade_type").append(trade_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 交易状态 */
	window.trans_order_status_show = function(type, data) {
		if (map.trans_order_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.trans_order_status.length; i++) {
						if (data == map.trans_order_status[i].value) {
							return map.trans_order_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var trans_order_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.trans_order_status.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.trans_order_status[i].value != 3 && map.trans_order_status[i]
									.value != 4) {
									trans_order_status_html += '<option value=' + map.trans_order_status[i]
										.value + ' title=' + map.trans_order_status[
											i].id + '>' +
										map.trans_order_status[i].name + '</option>'
								}
							} else {
								trans_order_status_html += '<option value=' + map.trans_order_status[i]
									.value + ' title=' + map.trans_order_status[
										i].id + '>' +
									map.trans_order_status[i].name + '</option>'
							}
							break;
						case 'radio':
							trans_order_status_html += '<input type="radio" name="ret_code" value=' + map
								.trans_order_status[i].value +
								' title=' + map.trans_order_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".trans_order_status").append(trans_order_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 商户状态 */
	window.pos_status_show = function(type, data) {
		console.log(data);
		if (map.pos_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.pos_status.length; i++) {
						if (data == map.pos_status[i].value) {
							return map.pos_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var pos_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.pos_status.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.pos_status[i].value != 3 && map.pos_status[i].value != 4) {
									pos_status_html += '<option value=' + map.pos_status[i].value +
										' title=' + map.pos_status[i].id + '>' +
										map.pos_status[i].name + '</option>'
								}
							} else {
								pos_status_html += '<option value=' + map.pos_status[i].value + ' title=' +
									map.pos_status[i].id + '>' +
									map.pos_status[i].name + '</option>'
							}
							break;
						case 'radio':
							pos_status_html += '<input type="radio" name="type" value=' + map.pos_status[i]
								.value + ' title=' + map.pos_status[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".pos_status").append(pos_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 机构类型 */
	window.agent_type_show = function(type, data) {
		if (map.agent_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.agent_type.length; i++) {
						if (data == map.agent_type[i].value) {
							return map.agent_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var agent_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.agent_type.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.agent_type[i].value != 3 && map.agent_type[i].value != 4) {
									agent_type_html += '<option value=' + map.agent_type[i].value +
										' title=' + map.agent_type[i].id + '>' +
										map.agent_type[i].name + '</option>'
								}
							} else {
								agent_type_html += '<option value=' + map.agent_type[i].value + ' title=' +
									map.agent_type[i].id + '>' +
									map.agent_type[i].name + '</option>'
							}
							break;
						case 'radio':
							agent_type_html += '<input type="radio" name="type" value=' + map.agent_type[i]
								.value + ' title=' + map.agent_type[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".agent_type").append(agent_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 卡类型 */
	window.payType_show = function(type, data) {
		if (map.payType.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.payType.length; i++) {
						if (data == map.payType[i].value) {
							return map.payType[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var payType_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.payType.length; i++) {
					switch (type) {
						case 'option':
							payType_html += '<option value=' + map.payType[i].value + ' title=' + map
								.payType[i].id + '>' +
								map.payType[i].name + '</option>'
							break;
						case 'radio':
							payType_html += '<input type="radio" name="paytype" value=' + map.payType[i]
								.value + ' title=' +
								map.payType[i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".payType").append(payType_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 机具状态 */
	window.pos_status_show = function(type, data) {
		if (map.pos_status.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.pos_status.length; i++) {
						if (data == map.pos_status[i].value) {
							return map.pos_status[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var pos_status_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.pos_status.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.pos_status[i].value != 3 && map.pos_status[i].value != 4) {
									pos_status_html += '<option value=' + map.pos_status[i].value +
										' title=' + map.pos_status[i].id + '>' +
										map.pos_status[i].name + '</option>'
								}
							} else {
								pos_status_html += '<option value=' + map.pos_status[i].value + ' title=' +
									map.pos_status[i].id + '>' +
									map.pos_status[i].name + '</option>'
							}
							break;
						case 'radio':
							pos_status_html += '<input type="radio" name="status" value=' + map.pos_status[
								i].value + ' title=' + map.pos_status[
								i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".pos_status").append(pos_status_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

	/* 结算类型 */
	window.site_rebate_settlement_show = function(type, data) {
		if (map.site_rebate_settlement.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.site_rebate_settlement.length; i++) {
						if (data == map.site_rebate_settlement[i].value) {
							return map.site_rebate_settlement[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var site_rebate_settlement_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.site_rebate_settlement.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.site_rebate_settlement[i].value != 3 && map.site_rebate_settlement[
										i].value != 4) {
									site_rebate_settlement_html += '<option value=' + map
										.site_rebate_settlement[i].value + ' title=' + map
										.site_rebate_settlement[
											i].id + '>' +
										map.site_rebate_settlement[i].name + '</option>'
								}
							} else {
								site_rebate_settlement_html += '<option value=' + map
									.site_rebate_settlement[i].value + ' title=' + map
									.site_rebate_settlement[
										i].id + '>' +
									map.site_rebate_settlement[i].name + '</option>'
							}
							break;
						case 'radio':
							site_rebate_settlement_html += '<input type="radio" name="settlement" value=' +
								map.site_rebate_settlement[i]
								.value + ' title=' + map.site_rebate_settlement[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".site_rebate_settlement").append(site_rebate_settlement_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 返佣类型 */
	window.site_rebate_member_show = function(type, data) {
		if (map.site_rebate_member.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.site_rebate_member.length; i++) {
						if (data == map.site_rebate_member[i].value) {
							return map.site_rebate_member[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var site_rebate_member_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.site_rebate_member.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.site_rebate_member[i].value != 3 && map.site_rebate_member[i]
									.value != 4) {
									site_rebate_member_html += '<option value=' + map.site_rebate_member[i]
										.value + ' title=' + map.site_rebate_member[
											i].id + '>' +
										map.site_rebate_member[i].name + '</option>'
								}
							} else {
								site_rebate_member_html += '<option value=' + map.site_rebate_member[i]
									.value + ' title=' + map.site_rebate_member[
										i].id + '>' +
									map.site_rebate_member[i].name + '</option>'
							}
							break;
						case 'radio':
							site_rebate_member_html +=
								'<input type="radio" name="type" lay-filter="type" value=' + map
								.site_rebate_member[
									i].value +
								' title=' + map.site_rebate_member[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".site_rebate_member").append(site_rebate_member_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 提现账户类型 */
	window.record_type_show = function(type, data) {
		if (map.record_type.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.record_type.length; i++) {
						if (data == map.record_type[i].value) {
							return map.record_type[i].name;
						}
					}
				} else {
					return ''
				}
			} else {
				var record_type_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.record_type.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.record_type[i].value != 3 && map.record_type[i].value != 4) {
									record_type_html += '<option value=' + map.record_type[i].value +
										' title=' + map.record_type[
											i].id + '>' +
										map.record_type[i].name + '</option>'
								}
							} else {
								record_type_html += '<option value=' + map.record_type[i].value +
									' title=' + map.record_type[
										i].id + '>' +
									map.record_type[i].name + '</option>'
							}
							break;
						case 'radio':
							record_type_html += '<input type="radio" name="type" value=' + map.record_type[
									i].value +
								' title=' + map.record_type[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".record_type").append(record_type_html);
				form.render('select')
				form.render('radio')
			}
		}
	}
	/* 会员类型 */
	window.trans_order_vip_show = function(type, data) {
		if (map.trans_order_vip.length > 0) {
			if (type == 1) {
				if (String(data)) {
					for (var i = 0; i < map.trans_order_vip.length; i++) {
						if (data == map.trans_order_vip[i].value) {
							return '<span style="color: ' + map.trans_order_vip[i].notes + '">' + map
								.trans_order_vip[i].name + '</span>';
						}
					}
				} else {
					return ''
				}
			} else {
				var trans_order_vip_html = type == 'option' ? '<option value="">全部</option>' : '';
				for (var i = 0; i < map.trans_order_vip.length; i++) {
					switch (type) {
						case 'option':
							if (data == 0) {
								if (map.trans_order_vip[i].value != 3 && map.trans_order_vip[i].value !=
									4) {
									trans_order_vip_html += '<option value=' + map.trans_order_vip[i]
										.value + ' title=' + map.trans_order_vip[
											i].id + '>' +
										map.trans_order_vip[i].name + '</option>'
								}
							} else {
								trans_order_vip_html += '<option value=' + map.trans_order_vip[i].value +
									' title=' + map.trans_order_vip[
										i].id + '>' +
									map.trans_order_vip[i].name + '</option>'
							}
							break;
						case 'radio':
							trans_order_vip_html += '<input type="radio" name="type" value=' + map
								.trans_order_vip[i].value +
								' title=' + map.trans_order_vip[
									i].name + '>'
							break;
						default:
							break;
					}
				}
				$(".trans_order_vip").append(trans_order_vip_html);
				form.render('select')
				form.render('radio')
			}
		}
	}

});

function PrefixInteger(num, length) {
	return (Array(length).join('0') + num).slice(-length);
}

function getday(date) {
	var date = new Date() || date;
	var year = date.getFullYear();
	var month = p(date.getMonth() + 1);
	var day = p(date.getDate());
	return year + '-' + month + '-' + day;
}

function getmonth(date) {
	var date = new Date() || date;
	var year = date.getFullYear();
	var month = p(date.getMonth() + 1);
	var day = p(date.getDate());
	return year + '-' + month;
}

function p(data) {
	return data > 10 ? data : '0' + data
}

function number_format(number, decimals, dec_point, thousands_sep) {
	/*
	 * 参数说明：
	 * number：要格式化的数字
	 * decimals：保留几位小数
	 * dec_point：小数点符号
	 * thousands_sep：千分位符号
	 * */
	number = (number + '').replace(/[^0-9+-Ee.]/g, '');
	var n = !isFinite(+number) ? 0 : +number,
		prec = !isFinite(+decimals) ? 2 : Math.abs(decimals),
		sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,
		dec = (typeof dec_point === 'undefined') ? '.' : dec_point,
		s = '',
		toFixedFix = function(n, prec) {
			var k = Math.pow(10, prec);
			return '' + Math.ceil(n * k) / k;
		};

	s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
	var re = /(-?\d+)(\d{3})/;
	while (re.test(s[0])) {
		s[0] = s[0].replace(re, "$1" + sep + "$2");
	}

	if ((s[1] || '').length < prec) {
		s[1] = s[1] || '';
		s[1] += new Array(prec - s[1].length + 1).join('0');
	}
	return s.join(dec);
}

function removearr(arr, val) {
	for (var i = 0; i < arr.length; i++) {
		console.log(arr[i] == val);
		if (arr[i] == val) {
			arr.splice(i, 1);
			break;
		}
	}
};

function trimSpace(array) {
	for (var i = 0; i < array.length; i++) {
		if (array[i] == " " || array[i] == null || typeof(array[i]) == "undefined") {
			array.splice(i, 1);
			i = i - 1;

		}
	}
	return array;
}

function dateval(obj) {

	var FullYear = obj.year;
	var Month = obj.month;
	var Day = obj.date;
	return FullYear + "-" + Month + "-" + Day;
}

$('.input_icon').on('focus', function() {
	var name = $(this).attr('name').split('_')[0]
	layer.open({
		type: 2,
		title: '选择',
		shadeClose: false,
		shade: 0.5,
		maxmin: true, //开启最大化最小化按钮
		area: ['90%', '90%'],
		content: '../../model/list.html?name=' + name,
		end: function() {},
		success: function() {}
	});
})
